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

Process m.room.encryption events before emitting RoomMember events #2910

Merged
merged 3 commits into from
Nov 25, 2022

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Nov 25, 2022

Fixes element-hq/element-web#23819.


Here's what your changelog entry will look like:

🐛 Bug Fixes

@richvdh richvdh requested a review from a team as a code owner November 25, 2022 13:05
We're going to call `onCryptoEvent` earlier in `processSyncResponse`, but we
need to have stored the room before doing so. We therefore need to move the
call to `storeRoom` earlier.

We can actually reduce a bit of duplication by moving the call into
`SyncApi.createRoom`.

`storeRoom` has relatively few side-effects, so as far as I can tell this
should be pretty safe.
This fixes the problematic race condition.
src/sync.ts Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verification fails to start (intermittently) when there is no existing DM with the target user
2 participants