mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-31 01:08:34 -04:00
Stop get_joined_users
corruption from custom statuses (#7376)
Fix a bug where the `get_joined_users` cache could be corrupted by custom status events (or other state events with a state_key matching the user ID). The bug was introduced by #2229, but has largely gone unnoticed since then. Fixes #7099, #7373.
This commit is contained in:
parent
5d64fefd6c
commit
a0e063387d
3 changed files with 52 additions and 2 deletions
|
@ -576,7 +576,8 @@ class RoomMemberWorkerStore(EventsWorkerStore):
|
|||
if key[0] == EventTypes.Member
|
||||
]
|
||||
for etype, state_key in context.delta_ids:
|
||||
users_in_room.pop(state_key, None)
|
||||
if etype == EventTypes.Member:
|
||||
users_in_room.pop(state_key, None)
|
||||
|
||||
# We check if we have any of the member event ids in the event cache
|
||||
# before we ask the DB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue