Explain why former members skip the leave entry on initial sync

This commit is contained in:
Paul Chobert committed 2026-10-29 18:15:22 +01:00
1 parent ee2e6fa0c1
commit 64e993eb4b
1 file changed
+2
+2
View File
@@ -3507,6 +3507,8 @@ class SyncHandler:
knock = await self.store.get_event(event.event_id)
knocked.append(KnockedSyncResult(room_id=event.room_id, knock=knock))
elif event.membership in (Membership.LEAVE, Membership.BAN):
# Former members of an announcement room get the synthetic join
# instead of this leave or ban.
if event.room_id in sync_result_builder.announcement_room_ids:
continue