summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <dawagner@gmail.com>2015-11-18 18:08:22 -0500
committerDaniel Wagner-Hall <dawagner@gmail.com>2015-11-18 18:11:12 -0500
commitbed7889703371dca893893d33f67e59e99cda111 (patch)
treeb7ba39987e76da347d02f08262b9fe80ad2b8ac8 /synapse/handlers
parentAllow users to forget rooms (diff)
downloadsynapse-bed7889703371dca893893d33f67e59e99cda111.tar.xz
Apply forgetting properly to historical events
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/_base.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index 6519f183df..95bb06395a 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.user_id,
+                    membership_event.room_id,
+                    membership_event.event_id
+                )
+                if was_forgotten_at_event:
+                    membership = None
+                else:
+                    membership = membership_event.membership
             else:
                 membership = None