matrix-bot-sdk icon indicating copy to clipboard operation
matrix-bot-sdk copied to clipboard

Pull to-device event list out of returned tuple

Open AndrewFerr opened this issue 2 years ago • 3 comments

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 [email protected]

Checklist

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

AndrewFerr avatar Jul 19 '23 13:07 AndrewFerr

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

AndrewFerr avatar Jul 19 '23 13:07 AndrewFerr

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@98882b9c23bdf03f875abf79060937047425a4c3, 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.

AndrewFerr avatar Aug 01 '23 06:08 AndrewFerr

Note that this applies on top of https://github.com/turt2live/matrix-bot-sdk/pull/330 due to requiring an update of the rust-sdk bindings, which necessitates handling the omission of the Sled crypto store.

AndrewFerr avatar Aug 11 '23 17:08 AndrewFerr