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

Pull to-device event list out of returned tuple #25

Merged
merged 7 commits into from
Aug 10, 2023

Conversation

AndrewFerr
Copy link
Member

@AndrewFerr AndrewFerr commented Jul 19, 2023

OlmMachine.receiveSyncChanges returns an array of [device messages, room key changes], so emit "to_device.decrypted" with that instead of the entire array.

Fixes regression introduced by turt2live#287.

Checklist

  • Tests written for all new code
  • Linter has been satisfied

@AndrewFerr AndrewFerr requested a review from a team as a code owner July 19, 2023 13:45
Copy link
Member

@Half-Shot Half-Shot 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

src/e2ee/CryptoClient.ts Show resolved Hide resolved
src/e2ee/CryptoClient.ts Outdated Show resolved Hide resolved
on account of it being removed from the crypto-sdk
OlmMachine.receiveSyncChanges returns an array of [device messages,
room key changes], so emit "to_device.decrypted" with that instead of
the entire array.

Fixes regression introduced by turt2live#287.
Also condense the validity checks on the returned value
@AndrewFerr
Copy link
Member Author

Finally added a test to this, which should prevent further regressions caused by potential future changes to the format of the string returned by OlmMachine.receiveSyncChanges.

Note that this depends on #24, as this PR requires an update of the Node bindings & thus needs handle not having support for the Sled crypto store.

@AndrewFerr AndrewFerr mentioned this pull request Aug 2, 2023
2 tasks
@AndrewFerr AndrewFerr merged commit d6a8ff6 into main Aug 10, 2023
2 checks passed
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