summary refs log tree commit diff
path: root/synapse/handlers/pagination.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-18 16:14:17 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-18 16:14:17 +0000
commit21fcaa872c32df091cdce06ab4b2704808e3fdd3 (patch)
treee3e46783ec9da758d49865fea90b3369378cdeab /synapse/handlers/pagination.py
parentMerge pull request #6310 from matrix-org/babolivier/msc2326_bg_update (diff)
parentMerge pull request #6295 from matrix-org/erikj/split_purge_history (diff)
downloadsynapse-21fcaa872c32df091cdce06ab4b2704808e3fdd3.tar.xz
Merge pull request #6295 from matrix-org/erikj/split_purge_history
* commit 'f713c01e2':
  Move type annotation into docstring
  Fix deleting state groups during room purge.
  Use correct type annotation
  Change to not require a state_groups.room_id index.
  Fix up comment
  Update log line to lie a little less
  Add state_groups.room_id index
  Docstrings
  Fix purge room API
  Newsfile
  Split purge API into events vs state
Diffstat (limited to 'synapse/handlers/pagination.py')
-rw-r--r--synapse/handlers/pagination.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py
index 08b068a439..7d5decba94 100644
--- a/synapse/handlers/pagination.py
+++ b/synapse/handlers/pagination.py
@@ -235,7 +235,9 @@ class PaginationHandler(object):
         self._purges_in_progress_by_room.add(room_id)
         try:
             with (yield self.pagination_lock.write(room_id)):
-                yield self.store.purge_history(room_id, token, delete_local_events)
+                yield self.storage.purge_events.purge_history(
+                    room_id, token, delete_local_events
+                )
             logger.info("[purge] complete")
             self._purges_by_id[purge_id].status = PurgeStatus.STATUS_COMPLETE
         except Exception:
@@ -278,7 +280,7 @@ class PaginationHandler(object):
             if joined:
                 raise SynapseError(400, "Users are still joined to this room")
 
-            await self.store.purge_room(room_id)
+            await self.storage.purge_events.purge_room(room_id)
 
     @defer.inlineCallbacks
     def get_messages(