Skip to content
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

feat(room_key_stream): Add support for lagging stream error #185

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BillCarsonFr
Copy link
Member

No description provided.

Copy link
Member

@andybalaam andybalaam left a 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!

/// `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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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 () => {
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants