matrix-org / matrix-org/matrix-spec
When a room is left and forgotten quickly, other devices aren't told about the leave in incremental sync
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
[The spec says](https://github.com/matrix-org/matrix-spec/blob/5c7bb2fcd55fbc888593c1b6a2cf8156694b1ffc/content/client-server-api/_index.md#leaving-rooms)
> Once a user leaves a room, it will no longer appear in the response to the [/sync](https://github.com/matrix-org/matrix-spec/blob/5c7bb2fcd55fbc888593c1b6a2cf8156694b1ffc/client-server-api/#get_matrixclientv3sync) API unless it is explicitly requested via a filter with the `include_leave` field set to true.
> Rooms which have been forgotten will never appear the response to the [/sync](https://github.com/matrix-org/matrix-spec/blob/5c7bb2fcd55fbc888593c1b6a2cf8156694b1ffc/client-server-api/#get_matrixclientv3sync) API, until the user re-joins, is re-invited, or knocks.
which suggests that rooms that have been left and forgotten should not show up in incremental sync responses, even if the client hasn't found out about leave yet. When a user has multiple devices, this makes it impossible for other devices to know that a room has been left if an incremental sync spans the leave and forget.
Synapse appears to violate the spec and always sends leaves for forgotten rooms over incremental sync, which is arguably more useful to clients.
related: https://github.com/matrix-org/matrix-spec/issues/1096
Contributor guide
Research direction
Start with content/client-server-api/_index.md and the linked /sync API section, then compare the leave and forgotten-room wording against the incremental-sync case described here. Resolve whether forgotten rooms should be omitted or reported when a sync spans leave and forget, and update the relevant specification text once the behavior is decided.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100