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 #332

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

AndrewFerr
Copy link
Contributor

@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 #287.

Signed-off-by: Andrew Ferrazzutti andrewf@element.io

Checklist

  • Tests written for all new code
  • Linter has been satisfied
  • Sign-off given on the changes (see CONTRIBUTING.md)

@AndrewFerr
Copy link
Contributor Author

I intend to add test coverage for this to prevent further regressions (whether self-inflicted or induced by dependency changes).

@AndrewFerr
Copy link
Contributor Author

On closer examination, the regression wasn't caused by #287, but by a change in the rust-sdk crypto crate which isn't yet in a release of the Node bindings (change = matrix-org/matrix-rust-sdk@98882b9, merging PR = matrix-org/matrix-rust-sdk#2142).

With that said, this PR will be needed only after a new release of the rust-sdk Node bindings is cut.

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
Contributor Author

Note that this applies on top of #330 due to requiring an update of the rust-sdk bindings, which necessitates handling the omission of the Sled crypto store.

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.

1 participant