-
Notifications
You must be signed in to change notification settings - Fork 14
feat(room_key_stream): Add support for lagging stream error #185
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
base: main
Are you sure you want to change the base?
feat(room_key_stream): Add support for lagging stream error #185
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.
Looks good. If you can add a test for the error callback case, feel free to merge!
src/machine.rs
Outdated
/// `error_callback` should be a function that takes a single argument (the | ||
/// error) and returns a Promise. When such an error happens that means | ||
/// that update stream lost track and that all current decryption failures | ||
/// can be retried as the key might as been imported without notice. |
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.
/// can be retried as the key might as been imported without notice. | |
/// should be retried as the key may have been imported without notice. |
@@ -929,6 +929,22 @@ describe(OlmMachine.name, () => { | |||
expect(keyInfoList.length).toEqual(1); | |||
expect(keyInfoList[0].roomId.toString()).toStrictEqual(room.toString()); | |||
}); | |||
|
|||
test("importing room keys calls RoomKeyUpdatedCallbacks", async () => { |
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.
We also need a test of the error case.
No description provided.