summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-02-08 18:44:52 +0000
committerRichard van der Hoff <richard@matrix.org>2018-02-09 13:07:41 +0000
commit74fcbf741b3a7b95b5cc44478050e8a40fb7dc46 (patch)
tree99deb06ce2673f82ee4be8b5c36ddf0b51954ede /synapse/handlers
parentpurge: Move cache invalidation to more appropriate place (diff)
downloadsynapse-74fcbf741b3a7b95b5cc44478050e8a40fb7dc46.tar.xz
delete_local_events for purge_history
Add a flag which makes the purger delete local events
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/message.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 1c7860bb05..276d1a7722 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -63,7 +63,7 @@ class MessageHandler(BaseHandler):
         self.spam_checker = hs.get_spam_checker()
 
     @defer.inlineCallbacks
-    def purge_history(self, room_id, event_id):
+    def purge_history(self, room_id, event_id, delete_local_events=False):
         event = yield self.store.get_event(event_id)
 
         if event.room_id != room_id:
@@ -72,7 +72,7 @@ class MessageHandler(BaseHandler):
         depth = event.depth
 
         with (yield self.pagination_lock.write(room_id)):
-            yield self.store.purge_history(room_id, depth)
+            yield self.store.purge_history(room_id, depth, delete_local_events)
 
     @defer.inlineCallbacks
     def get_messages(self, requester, room_id=None, pagin_config=None,