summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-07-05 10:28:51 +0100
committerErik Johnston <erik@matrix.org>2016-07-05 10:28:51 +0100
commit2d21d43c34751cffb5f324bd58ceff060f65f679 (patch)
treef94af9ec9b706479284c3fe3842fed5f64650fdd /synapse/storage/events.py
parentAdd storage function to purge history for a room (diff)
downloadsynapse-2d21d43c34751cffb5f324bd58ceff060f65f679.tar.xz
Add purge_history API
Diffstat (limited to '')
-rw-r--r--synapse/storage/events.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 98c917ce15..c3b498bb3d 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -1281,6 +1281,12 @@ class EventsStore(SQLBaseStore):
             )
         return self.runInteraction("get_all_new_events", get_all_new_events_txn)
 
+    def delete_old_state(self, room_id, topological_ordering):
+        return self.runInteraction(
+            "delete_old_state",
+            self._delete_old_state_txn, room_id, topological_ordering
+        )
+
     def _delete_old_state_txn(self, txn, room_id, topological_ordering):
         """Deletes old room state
         """