summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-07-18 15:29:45 +0100
committerErik Johnston <erik@matrix.org>2018-07-18 15:33:03 +0100
commitbacdf0cbf9fdbf9bbab2420b86308830ac4e4592 (patch)
tree9f3561c921aada932160c4b0a485bedce6df120e /synapse/handlers
parentSplit MessageHandler into read only and writers (diff)
downloadsynapse-bacdf0cbf9fdbf9bbab2420b86308830ac4e4592.tar.xz
Move RoomContextHandler out of Handlers
This is in preparation for moving GET /context/ to a worker
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/__init__.py2
-rw-r--r--synapse/handlers/room.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/synapse/handlers/__init__.py b/synapse/handlers/__init__.py
index 0bad3e0a2e..413425fed1 100644
--- a/synapse/handlers/__init__.py
+++ b/synapse/handlers/__init__.py
@@ -18,7 +18,6 @@ from .directory import DirectoryHandler
 from .federation import FederationHandler
 from .identity import IdentityHandler
 from .register import RegistrationHandler
-from .room import RoomContextHandler
 from .search import SearchHandler
 
 
@@ -48,4 +47,3 @@ class Handlers(object):
         self.admin_handler = AdminHandler(hs)
         self.identity_handler = IdentityHandler(hs)
         self.search_handler = SearchHandler(hs)
-        self.room_context_handler = RoomContextHandler(hs)
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index f67512078b..6150b7e226 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -395,7 +395,11 @@ class RoomCreationHandler(BaseHandler):
             )
 
 
-class RoomContextHandler(BaseHandler):
+class RoomContextHandler(object):
+    def __init__(self, hs):
+        self.hs = hs
+        self.store = hs.get_datastore()
+
     @defer.inlineCallbacks
     def get_event_context(self, user, room_id, event_id, limit):
         """Retrieves events, pagination tokens and state around a given event