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

Add TestDelayedInviteResponse #98

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Add TestDelayedInviteResponse #98

merged 2 commits into from
Jul 2, 2024

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Jun 28, 2024

  • Add InviteUser to accomodate this.

Implements and fixes #97

- Add `InviteUser` to accomodate this.
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; thanks.

@kegsay kegsay merged commit b413cda into main Jul 2, 2024
4 checks passed
bnjbvr pushed a commit to matrix-org/matrix-rust-sdk that referenced this pull request Jul 10, 2024
This is needed to prevent the race condition where the invite request finished, the `/sync` one didn't fetch the new membership event yet and we send a message in the room. This message won't be encrypted for the newly invited user and will result in an UTD.

I added a new integration test and I can confirm this [complement-crypto test](matrix-org/complement-crypto#98) now passes instead of being skipped.

Fixes #3622.

---

* fix(sdk): force room member reload after inviting a user

This is needed to prevent the race condition where the invite request finished, the `/sync` one didn't fetch the new membership event yet and we send a message in the room. This message won't be encrypted for the newly invited user and will result in an UTD.

* Use `room.mark_members_missing()` instead, add integration test

* Abort syncing before the test ends

* Resolve nit: else after a return

* Fix race condition where bob may try to join the room before the invite is received

* Remove double sync
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.

Test what happens if you delay invites and send messages
2 participants