-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
basic callback on secret stream #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance of a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few nits & suggestions; generally seems good
/// Register a callback which will be called whenever a secret | ||
/// (`m.secret.send`) is received. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it true that it is called for all m.secret.send
events? I got the impression that some secrets (the cross-signing keys?) were handled internally? I might be wrong though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No you are right for now it will only return is the backup decryption key. The cross signing keys are handled internally and custom secret are not yet supported.
Added a comment here and in get_secrets
There is no API to inject a secret to test the signaling. So no simple way to test it, but there is a full integrated test on the js-sdk side to test it |
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
/// `callback` should be a function that takes 2 arguments: the secret name | ||
/// (string) and value (string). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it not matter what it returns?
@@ -1100,19 +1100,26 @@ impl OlmMachine { | |||
/// Register a callback which will be called whenever a secret | |||
/// (`m.secret.send`) is received. | |||
/// | |||
/// The only secret this will currently broadcast is the | |||
/// `m.megolm_backup.v1` (the cross signing secrets are handled internaly). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// `m.megolm_backup.v1` (the cross signing secrets are handled internaly). | |
/// `m.megolm_backup.v1` (the cross signing secrets are handled internally). |
/// The only secret this will currently be returned is the | ||
/// `m.megolm_backup.v1` secret. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// The only secret this will currently be returned is the | |
/// `m.megolm_backup.v1` secret. | |
/// The only secret this will currently return is the | |
/// `m.megolm_backup.v1` secret. |
(Looks like we have a flaky test) |
Yes, I see that we create OlmMachine but never close them? |
Adds support for secret stream in wasm.