This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
/sync should not include a room in 'leave' and 'invite' #14683
Labels
A-Sync
defects related to /sync
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Major
Major functionality / product severely impaired, no satisfactory workaround.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Description
When a User A kicks a User B and invites User B directly again, without User B syncing in between (because the client-app was closed for example), then the /sync response for User B includes the room in both
rooms.invite
androoms.leave
.Since the client by default cannot rely on
origin_server_ts
for the order of events as there could be multiple servers with different time, some clients (like matrix-js-sdk) process the events in the wrong order (first the invite, then the leave) resulting in a wrong state on the client. The corresponding room cannot be used to chat, as the client thinks he left, when in reality he has an invitation to the room.If the room is only inlcuded in either "leave" or "invite" (whichever is the newest event), then the client would always have the correct state
Here is a result of
/sync
for User B:/sync Result
Steps to reproduce
Homeserver
chat.krz.tools
Synapse Version
1.73.0
Installation Method
I don't know
Database
PostgreSQL and the rest I don't know
Workers
Single process
Platform
running in a vm as far as I know
Configuration
No response
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: