mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-29 15:11:33 +00:00
75a508cc27
Proposed fix for issue: https://github.com/matrix-org/dendrite/issues/2838 Suppose bob received invites to spaceA and spaceB. When Bob joins spaceA, we add an OutputEvent event to retire the invite. This sets the invite to "deleted" in the database. This makes sense. The bug is in stream_invites.go. Triggered when bob received a new invite for spaceB, and does a client sync. In the block (line 76) `for roomID := range retiredInvites if _, ok := req.Response.Rooms.Invite[roomID]; ok { continue } if _, ok := req.Response.Rooms.Join[roomID]; ok { continue } ... ` Bob is not in either maps even though he had just accepted the invite for spaceA. Consequently, the spaceA invite is treated as a retired invite, and a membership Leave event is generated. What bob sees is that after accepting the invite to spaceB, he lose access to spaceA. ### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [ ] I have added tests for PR _or_ I have justified why this PR doesn't need tests. * [x ] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `Tak Wai Wong <tak@hntlabs.com>` Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com> |
||
---|---|---|
.. | ||
stream_accountdata.go | ||
stream_devicelist.go | ||
stream_invite.go | ||
stream_notificationdata.go | ||
stream_pdu.go | ||
stream_presence.go | ||
stream_receipt.go | ||
stream_sendtodevice.go | ||
stream_typing.go | ||
streamprovider.go | ||
streams.go | ||
template_stream.go |