diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-11-20 18:07:26 +0000 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-11-20 18:07:26 +0000 |
commit | c6a15f5026035b2bdd62cffaf0e2d70497197d05 (patch) | |
tree | c57fcad9c735e2146cd080f47c1d43252607f4b8 /synapse/handlers/_base.py | |
parent | Merge pull request #395 from matrix-org/erikj/perspective_limiter (diff) | |
parent | Merge branch 'daniel/forgetrooms' of github.com:matrix-org/synapse into danie... (diff) | |
download | synapse-c6a15f5026035b2bdd62cffaf0e2d70497197d05.tar.xz |
Merge pull request #385 from matrix-org/daniel/forgetrooms
Allow users to forget rooms
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r-- | synapse/handlers/_base.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py index 6519f183df..5fd20285d2 100644 --- a/synapse/handlers/_base.py +++ b/synapse/handlers/_base.py @@ -92,7 +92,15 @@ class BaseHandler(object): membership_event = state.get((EventTypes.Member, user_id), None) if membership_event: - membership = membership_event.membership + was_forgotten_at_event = yield self.store.was_forgotten_at( + membership_event.state_key, + membership_event.room_id, + membership_event.event_id + ) + if was_forgotten_at_event: + membership = None + else: + membership = membership_event.membership else: membership = None |