summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room.py2
-rw-r--r--synapse/rest/client/v1/room.py4
-rw-r--r--synapse/server.py7
3 files changed, 3 insertions, 10 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 0242288c4e..edb96cec83 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -246,8 +246,6 @@ class RoomMemberHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def get_room_members(self, room_id):
-        hs = self.hs
-
         users = yield self.store.get_users_in_room(room_id)
 
         defer.returnValue([UserID.from_string(u) for u in users])
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index c5837b3403..f0a9c932c1 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -20,7 +20,7 @@ from base import RestServlet, client_path_pattern
 from synapse.api.errors import SynapseError, Codes
 from synapse.streams.config import PaginationConfig
 from synapse.api.constants import EventTypes, Membership
-from synapse.types import UserID
+from synapse.types import UserID, RoomID
 
 import json
 import logging
@@ -227,7 +227,7 @@ class JoinRoomAliasServlet(RestServlet):
             identifier = self.hs.parse_roomalias(room_identifier)
             is_room_alias = True
         except SynapseError:
-            identifier = self.hs.parse_roomid(room_identifier)
+            identifier = RoomID.from_string(room_identifier)
 
         # TODO: Support for specifying the home server to join with?
 
diff --git a/synapse/server.py b/synapse/server.py
index 52a21aaf78..4dfff04277 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -26,7 +26,7 @@ from synapse.api.auth import Auth
 from synapse.handlers import Handlers
 from synapse.state import StateHandler
 from synapse.storage import DataStore
-from synapse.types import UserID, RoomAlias, RoomID, EventID
+from synapse.types import RoomAlias, EventID
 from synapse.util import Clock
 from synapse.util.distributor import Distributor
 from synapse.util.lockutils import LockManager
@@ -132,11 +132,6 @@ class BaseHomeServer(object):
         object."""
         return RoomAlias.from_string(s)
 
-    def parse_roomid(self, s):
-        """Parse the string given by 's' as a Room ID and return a RoomID
-        object."""
-        return RoomID.from_string(s)
-
     def parse_eventid(self, s):
         """Parse the string given by 's' as a Event ID and return a EventID
         object."""