summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_member.py3
-rw-r--r--synapse/handlers/sync.py6
-rw-r--r--synapse/handlers/typing.py6
3 files changed, 4 insertions, 11 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index b785a8fa97..4e3c1c1c96 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -428,8 +428,7 @@ class RoomMemberHandler(BaseHandler):
         )
 
         if invitee:
-            handler = self.hs.get_handlers().room_member_handler
-            yield handler.update_membership(
+            yield self.update_membership(
                 requester,
                 UserID.from_string(invitee),
                 room_id,
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index 921215469f..e83f3e9c44 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -485,7 +485,6 @@ class SyncHandler(BaseHandler):
             sync_config, now_token, since_token
         )
 
-        rm_handler = self.hs.get_handlers().room_member_handler
         app_service = yield self.store.get_app_service_by_user_id(
             sync_config.user.to_string()
         )
@@ -493,9 +492,10 @@ class SyncHandler(BaseHandler):
             rooms = yield self.store.get_app_service_rooms(app_service)
             joined_room_ids = set(r.room_id for r in rooms)
         else:
-            joined_room_ids = yield rm_handler.get_joined_rooms_for_user(
-                sync_config.user
+            rooms = yield self.store.get_rooms_for_user(
+                sync_config.user.to_string()
             )
+            joined_room_ids = set(r.room_id for r in rooms)
 
         user_id = sync_config.user.to_string()
 
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py
index 92eff534d6..fca8d25c3f 100644
--- a/synapse/handlers/typing.py
+++ b/synapse/handlers/typing.py
@@ -229,7 +229,6 @@ class TypingNotificationEventSource(object):
         self.hs = hs
         self.clock = hs.get_clock()
         self._handler = None
-        self._room_member_handler = None
 
     def handler(self):
         # Avoid cyclic dependency in handler setup
@@ -237,11 +236,6 @@ class TypingNotificationEventSource(object):
             self._handler = self.hs.get_handlers().typing_notification_handler
         return self._handler
 
-    def room_member_handler(self):
-        if not self._room_member_handler:
-            self._room_member_handler = self.hs.get_handlers().room_member_handler
-        return self._room_member_handler
-
     def _make_event_for(self, room_id):
         typing = self.handler()._room_typing[room_id]
         return {