0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-17 06:13:54 +01:00

Merge pull request #2056 from matrix-org/dbkr/fix_invite_reject

Fix rejection of invites not reaching sync
This commit is contained in:
David Baker 2017-03-24 10:32:51 +00:00 committed by GitHub
commit f902e89d4b

View file

@ -134,6 +134,13 @@ def filter_events_for_clients(store, user_tuples, events, event_id_to_state):
if prev_membership not in MEMBERSHIP_PRIORITY:
prev_membership = "leave"
# Always allow the user to see their own leave events, otherwise
# they won't see the room disappear if they reject the invite
if membership == "leave" and (
prev_membership == "join" or prev_membership == "invite"
):
return True
new_priority = MEMBERSHIP_PRIORITY.index(membership)
old_priority = MEMBERSHIP_PRIORITY.index(prev_membership)
if old_priority < new_priority: