diff options
author | David Baker <dbkr@users.noreply.github.com> | 2017-03-24 10:32:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-24 10:32:51 +0000 |
commit | f902e89d4b1c6ffe9118bf54492fc408bd30a631 (patch) | |
tree | 9070f78eb5e94ea4bc5ba96cf8aa3bf0213a7330 /synapse/visibility.py | |
parent | Merge pull request #2050 from matrix-org/rav/federation_backoff (diff) | |
parent | Fix rejection of invites not reaching sync (diff) | |
download | synapse-f902e89d4b1c6ffe9118bf54492fc408bd30a631.tar.xz |
Merge pull request #2056 from matrix-org/dbkr/fix_invite_reject
Fix rejection of invites not reaching sync
Diffstat (limited to 'synapse/visibility.py')
-rw-r--r-- | synapse/visibility.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/visibility.py b/synapse/visibility.py index 199b16d827..31659156ae 100644 --- a/synapse/visibility.py +++ b/synapse/visibility.py @@ -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: |