summary refs log tree commit diff
path: root/synapse/handlers/admin.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-23 17:25:54 +0100
committerErik Johnston <erik@matrix.org>2019-10-30 14:46:54 +0000
commit69f0054ce675bd9d35104c39af9fae9a908b7f33 (patch)
tree40dc037ff3bd919937cc5cb2deba317d3df40421 /synapse/handlers/admin.py
parentAdd StateGroupStorage interface (diff)
downloadsynapse-69f0054ce675bd9d35104c39af9fae9a908b7f33.tar.xz
Port to use state storage
Diffstat (limited to 'synapse/handlers/admin.py')
-rw-r--r--synapse/handlers/admin.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py
index 1a87b58838..6407d56f8e 100644
--- a/synapse/handlers/admin.py
+++ b/synapse/handlers/admin.py
@@ -30,6 +30,9 @@ class AdminHandler(BaseHandler):
     def __init__(self, hs):
         super(AdminHandler, self).__init__(hs)
 
+        self.storage = hs.get_storage()
+        self.state_store = self.storage.state
+
     @defer.inlineCallbacks
     def get_whois(self, user):
         connections = []
@@ -205,7 +208,7 @@ class AdminHandler(BaseHandler):
 
                 from_key = events[-1].internal_metadata.after
 
-                events = yield filter_events_for_client(self.store, user_id, events)
+                events = yield filter_events_for_client(self.storage, user_id, events)
 
                 writer.write_events(room_id, events)
 
@@ -241,7 +244,7 @@ class AdminHandler(BaseHandler):
             for event_id in extremities:
                 if not event_to_unseen_prevs[event_id]:
                     continue
-                state = yield self.store.get_state_for_event(event_id)
+                state = yield self.state_store.get_state_for_event(event_id)
                 writer.write_state(room_id, event_id, state)
 
         return writer.finished()