mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-02 18:04:49 -04:00
Merge pull request #2858 from matrix-org/rav/purge_updates
delete_local_events for purge_room_history
This commit is contained in:
commit
10b34dbb9a
5 changed files with 100 additions and 41 deletions
|
@ -51,7 +51,7 @@ class MessageHandler(BaseHandler):
|
|||
self.pagination_lock = ReadWriteLock()
|
||||
|
||||
@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:
|
||||
|
@ -60,7 +60,7 @@ class MessageHandler(BaseHandler):
|
|||
depth = event.depth
|
||||
|
||||
with (yield self.pagination_lock.write(room_id)):
|
||||
yield self.store.delete_old_state(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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue