sync: retire identities from all invite rooms, not just Space+General

The retirement half of sync_matrix_space() iterated [MATRIX_SPACE_ID] + the
General room while the invite half used member_invite_rooms() (MATRIX_INVITE_ROOMS,
7 rooms including Skillshare). A retired local identity was therefore left in
Design, Community, Infrastructure, Updates and Skillshare — a privacy problem in
member-only rooms. Iterate member_invite_rooms() in both halves so they cannot
drift again. Retirement logic (kick joined / revoke invite-state) is unchanged.
This commit is contained in:
inference-bot committed 2026-11-04 01:05:41 +00:00
1 parent d5b4a2e03a
commit a89c464834
1 file changed
+4 -1
+4 -1
View File
@@ -1462,7 +1462,10 @@ async def sync_matrix_space() -> dict:
# the one-identity rule. Revoke invites via state-event membership
# (kick 403s on invite-state users).
import urllib.parse # local import: only needed on this retire path
for room in [MATRIX_SPACE_ID] + ([MATRIX_GENERAL_ROOM] if MATRIX_GENERAL_ROOM else []):
# Same room set as the invite half (member_invite_rooms()) so the
# two cannot drift apart again: a retired identity must be removed
# from every room we invite members to, not just Space + General.
for room in member_invite_rooms():
enc_room = urllib.parse.quote(room, safe="")
if local_mxid in joined:
await client.post(