Commit Graph
26256 Commits
Author SHA1 Message Date
Paul Chobert a513adc191 Test private read receipts of non-members in announcement rooms 2026-10-28 18:09:29 +01:00
Paul Chobert aa7ddf8994 Keep read receipts in announcement rooms private to their sender 2026-10-28 18:09:29 +01:00
Paul Chobert c8b2706de2 Test that a non-member's read receipt is not sent to other users 2026-10-28 18:09:29 +01:00
Paul Chobert d7b191a1fb Deliver a non-member's read receipts in announcement rooms to their other devices 2026-10-28 18:09:29 +01:00
Paul Chobert 5cb675a5c7 Test that a non-member's read receipt reaches their other devices 2026-10-28 17:17:23 +01:00
Paul Chobert 50b26e6cd5 Add changelog entry 2026-10-28 17:06:50 +01:00
Paul Chobert ff17c60028 Test that a non-member can send a read receipt in an announcement room 2026-10-28 16:58:14 +01:00
Paul Chobert 638f4ea516 Remove the sliding sync revoked invite test for server announcements
Users are never invited to announcement rooms.
2026-10-28 16:01:30 +01:00
Paul Chobert 4220f9137c Check the server announcement device list test against a regular room
The test only checked that a non-member does not get the announcer's
device change, so it would also pass if the change produced no device
list update at all. A user sharing a regular room with the announcer now
gets that same change in the same test.
2026-10-28 16:01:30 +01:00
Paul Chobert 0567ffba94 Remove the sliding sync unread count test for server announcements
Sliding sync always sends 0 for the notification and highlight counts of every room, so the test could not fail.
2026-10-28 16:01:30 +01:00
Paul Chobert 3294f0e2aa Send server announcement rooms with what they missed while left out
A sender removed before anything was announced gets the synthetic join,
then the room is left out of their lists until the first announcement.
It was dropped from the rooms checked for updates outside the lists, so
the connection kept it as sent up to its last token: when the
announcement listed it again, only that announcement went down and any
change made in between, such as a new room name, was lost.

The rooms left out are now kept among the rooms checked for updates,
without being listed. A change while they are left out marks them as
only partly sent, and they come back with everything since. This reuses
the existing tracking of rooms outside the list ranges, instead of
resending the room from scratch when it is listed again, which would
need its own bookkeeping.
2026-10-28 16:01:30 +01:00
Paul Chobert 2a9475f48c Stop treating a ban like a kick for server announcements in sliding sync
Nobody is banned from an announcement room in practice: senders are
removed from the config, which kicks them. Only a leave now gives way to
the synthetic join again.
2026-10-28 16:01:29 +01:00
Paul Chobert 9530a96772 List server announcement rooms in sliding sync as legacy sync does
An announcement room the user is not a member of is now listed when it
holds an announcement, or when the user left, was kicked or was banned
within the request's window, and otherwise left out. A user removed
before anything was announced no longer gets the room on a new
connection, and a user leaving on their own before any announcement gets
the synthetic join in the same response instead of their leave.

The room is then never sent with the user's real leave, so resending it
from scratch afterwards is no longer needed.
2026-10-28 16:01:29 +01:00
Paul Chobert 51e50b7d0c Treat a ban like a kick for server announcements in sliding sync
A user banned from an announcement room kept their real ban, so they
stopped getting announcements. As in legacy sync, a ban now gives way to
the synthetic join like a kick does, and is left out of `required_state`
and the timeline.
2026-10-28 16:01:29 +01:00
Paul Chobert cae4f60ada Test a member leaving before any server announcement in sliding sync 2026-10-28 16:01:29 +01:00
Paul Chobert 857850bedc Switch removed members to the synthetic join before any announcement
A member removed from the configured senders before anything was
announced got their kick, and the room only came back as joined with the
first announcement. Their room now gets the synthetic join straight away,
at the position of the kick until there is an announcement.

Only kicks count: both paths always keep them in the user's memberships,
while the new tables leave out the user's own past leaves.

Also test that a removed member added back gets their real join and the
power levels that let them post again.
2026-10-28 16:01:29 +01:00
Paul Chobert 169640a46b Switch leaving members straight to the synthetic join in sliding sync
A member who left or was removed from an announcement room first got
their leave, then the synthetic join on the next sync. They now get the
synthetic join instead of their leave in the same sync, as in legacy
sync, once the room has had an announcement. Before that, the leave
still goes down and the room is sent again from scratch later.
2026-10-28 16:01:29 +01:00
Paul Chobert c4130fe15b Test that leaving members get server announcements on the next sliding sync 2026-10-28 16:01:28 +01:00
Paul Chobert 799aa3f04c Explain which events make a server announcement room show up in sliding sync 2026-10-28 16:01:28 +01:00
Paul Chobert bddeb6929f Document the cost of looking up server announcement rooms in sliding sync 2026-10-28 16:01:28 +01:00
Paul Chobert bb05d6579a Leave the user's own membership out of server announcement timelines
A timeline reaching back to the user's leave or kick ended with that
membership after the synthetic join in `required_state`, so clients saw
the user as having left. The user's own membership events are now dropped
from the timeline of a server announcement room, as they already are from
its `required_state`.
2026-10-28 16:01:28 +01:00
Paul Chobert a4ef9b36c0 Resend server announcement rooms from scratch after the user leaves
A user who left or was kicked while their connection was open never got
the synthetic join afterwards, since only state changes were sent. When a
response sends the user's new leave in an announcement room, the room is
now recorded as never sent, so its next delivery holds the full
`required_state` with the synthetic join.
2026-10-28 16:01:28 +01:00
Paul Chobert b5fd5083c1 Deliver server announcements to removed members in sliding sync
A user removed from the configured senders is kicked, and both paths
kept the kick as their membership, so they never got the synthetic join.
Only a leave that isn't newly left now gives way to the synthetic join.

On an existing connection, the synthetic join is still not sent after
the kick, as `test_removed_member_existing_connection` shows.
2026-10-28 16:01:28 +01:00
Paul Chobert c9a8974d3d Merge remote-tracking branch 'upstream/barodeur/srv-announcements-sync-legacy' into barodeur/srv-announcements-sync-sliding 2026-10-28 11:12:25 +01:00
Paul Chobert d9ced20bbc Remove the is_announcement docstring 2026-10-28 10:55:15 +01:00
Paul Chobert 4f2bba6ba9 Simplify the synthetic join docstring 2026-10-28 10:52:00 +01:00
Paul Chobert 9e9d613663 Deliver announcement rooms for any new event after their first announcement 2026-10-28 10:42:19 +01:00
Paul Chobert 5700888e55 Explain why the synthetic join ignores the sync filter 2026-10-28 10:42:19 +01:00
Paul Chobert ed314d8022 Test device lists and state_after for announcement rooms 2026-10-28 10:42:19 +01:00
Paul Chobert da93cff424 Deliver announcement rooms whose last announcement is out of the timeline 2026-10-28 10:42:18 +01:00
Paul Chobert 96d8c3b66c Fix the announcement latency bound in the sync docstring 2026-10-28 10:42:18 +01:00
Paul Chobert eafdf9782b Explain why announcements do not wake up waiting syncs 2026-10-28 10:42:18 +01:00
Paul Chobert 4cff8e5eea Explain why announcement rooms have no unread counts 2026-10-28 10:42:18 +01:00
Paul Chobert acc6dd136c Explain why announcement rooms always carry full state 2026-10-28 10:42:18 +01:00
Paul Chobert 3b56c581f8 Spell out the no membership change case for announcement rooms 2026-10-28 10:42:18 +01:00
Paul Chobert 29eb4b5f44 Deliver announcement rooms in the sync that carries the user's leave 2026-10-28 10:42:18 +01:00
Paul Chobert 0b6a20fa1e Deliver announcements to members removed while offline on incremental sync 2026-10-28 10:42:17 +01:00
Paul Chobert f1d933c0e5 Deliver announcements to removed members on initial sync 2026-10-27 17:25:04 +01:00
Paul Chobert 14a30ca064 Strip the user's real membership from announcement room timelines 2026-10-27 17:20:41 +01:00
Paul Chobert f40d958e9f Add changelog entry 2026-10-27 16:59:12 +01:00
Paul Chobert 0358d215c1 Test that sliding sync sends no unread counts or device list changes from server announcement rooms 2026-10-27 16:52:33 +01:00
Paul Chobert 86794866dc Deliver server announcements to self-left members in sliding sync fallback
The fallback path kept the self-leave in the membership map, so the
announcement room was skipped and then filtered out of the lists. Only
memberships the lists keep now prevent the synthetic join.

Also test that the room stays in the list, is ordered like the user's
other rooms, and can be subscribed to directly.
2026-10-27 16:52:33 +01:00
Paul Chobert ed34029626 Deliver server announcements to non-members in sliding sync 2026-10-27 16:52:33 +01:00
Paul Chobert 7f444b13b9 Add changelog entry 2026-10-27 14:23:55 +01:00
Paul Chobert ddf8b70388 Test server announcement delivery in legacy sync 2026-10-27 13:57:20 +01:00
Paul Chobert 647c846424 Deliver server announcements to non-members in legacy initial sync 2026-10-27 12:34:06 +01:00
Paul Chobert af50a3dde7 Deliver server announcements to non-members in legacy incremental sync 2026-10-27 12:34:06 +01:00
Eric Eastwood 4cece59c30 Drop support for Python 3.10 (#20359)
Fix https://github.com/element-hq/synapse/issues/20041

Keywords:

 - `3.10`
 - `py310`
 - `cp310`
2026-10-26 16:26:19 -05:00
Andrew MorganandPaul Chobert b27615282d [Server Announcements] [Create/Configure Rooms] Configure announcement rooms and reconcile them on startup (#20372)
Co-authored-by: Paul Chobert <paul@chobert.fr>
2026-10-26 17:20:04 +00:00
Johannes MarbachandOlivier 'reivilibre 0d28e93a7a Move the sticky events sliding sync extension to the global pos and MSC4508 scoping (#20363)
This includes the following:
    
- Implements ['Implicit Forward
Pagination'](https://github.com/matrix-org/matrix-spec/issues/2378).
Remove the extension's `since` and `next_batch` fields. The position is
now tracked via the global `pos`, with per-room connection state
recording how far each room has been sent so that `limit` paginates
without holding `pos` back and lost responses are re-delivered.
- Discussed in
https://github.com/matrix-org/matrix-spec-proposals/pull/4480#discussion_r4165887827
- Honour the `lists` and `rooms` fields.
- Send all unexpired sticky events when a room enters scope for the
first time or is newly joined, and catch up on events sent while a room
was out of scope when it re-enters.
- Enabling the extension partway through a connection returns all
unexpired sticky events for in-scope rooms, and re-enabling it after
disabling it returns the unexpired sticky events sent in the meantime.

I tried to split this up into standalone commits though the bulk of the
change is in the third commit.

---------

Co-authored-by: Olivier 'reivilibre <git.oo@emunest.net>
2026-10-26 14:02:22 +00:00