forked-synapse/synapse/api
Eric Eastwood 3fef535ff2
Add rooms.bump_stamp to Sliding Sync /sync for easier client-side sorting (#17395)
`bump_stamp` corresponds to the `stream_ordering` of the latest `DEFAULT_BUMP_EVENT_TYPES` in the room. This helps clients sort more readily without them needing to pull in a bunch of the timeline to determine the last activity. `bump_event_types` is a thing because for example, we don't want display name changes to mark the room as unread and bump it to the top. For encrypted rooms, we just have to consider any activity as a bump because we can't see the content and the client has to figure it out for themselves.

Outside of Synapse, `bump_stamp` is just a free-form counter so other implementations could use `received_ts`or `origin_server_ts` (see the [*Security considerations* section in MSC3575 about the potential pitfalls of using `origin_server_ts`](https://github.com/matrix-org/matrix-spec-proposals/blob/kegan/sync-v3/proposals/3575-sync.md#security-considerations)). It doesn't have any guarantee about always going up. In the Synapse case, it could go down if an event was redacted/removed (or purged in cases of retention policies).

In the future, we could add `bump_event_types` as [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) mentions if people need to customize the event types.

---

In the Sliding Sync proxy, a similar [`timestamp` field was added](https://github.com/matrix-org/sliding-sync/pull/247) for the same purpose but the name is not obvious what it pertains to or what it's for.

The `timestamp` field was also added to Ruma in https://github.com/ruma/ruma/pull/1622
2024-07-08 13:17:08 -05:00
..
auth MSC3861: allow overriding the introspection endpoint (#17406) 2024-07-08 14:08:11 +02:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
auth_blocking.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
constants.py Add rooms.bump_stamp to Sliding Sync /sync for easier client-side sorting (#17395) 2024-07-08 13:17:08 -05:00
errors.py Stabilize support for Retry-After header (MSC4014) (#16947) 2024-03-08 09:33:46 +00:00
filtering.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
presence.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
ratelimiting.py Support MSC3916 by adding _matrix/client/v1/media/download endpoint (#17365) 2024-07-02 14:07:04 +01:00
room_versions.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
urls.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00