mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 17:47:28 +00:00
Add `org.matrix.msc4428.member_info` to `/sync` (joined and left rooms), sliding sync, `/members`, and `user_id` to `/joined_members` entries. A new `MemberInfoHandler` computes the map; entries are only produced where the mapping differs from the stable ID itself, so it only names erased users (`user_id: null`, via `are_users_erased`). A room's map covers the stable IDs the response mentions: senders of its timeline, state and sticky events, targets of its membership events, and the room's heroes. On an initial sync without lazy-loaded members that is every member; a lazy-loading client gets the entries for members it loads later from `/members`, which always carries the map. On sync the map is omitted when empty, and `member_info` counts towards whether a room is included in the response. Changes with no event anchor (the erasure itself) are delivered by the next event from or about that member, or on the next full sync; a stream for them is A3. With `msc4428_enabled` off the responses are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>