summary refs log tree commit diff
path: root/synapse/handlers/admin.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-31 16:17:53 +0100
committerGitHub <noreply@github.com>2019-10-31 16:17:53 +0100
commitdfe0cd71b61c043592cc27b64725918aa5c64724 (patch)
treeec416471ef0ef54e0f959a9618a07e6ba9ccb64c /synapse/handlers/admin.py
parentExpose some homeserver functionality to spam checkers (#6259) (diff)
parentApply suggestions from code review (diff)
downloadsynapse-dfe0cd71b61c043592cc27b64725918aa5c64724.tar.xz
Merge pull request #6294 from matrix-org/erikj/add_state_storage
Add StateGroupStorage interface
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()