diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-08-13 17:43:10 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-08-13 18:03:41 +0100 |
commit | 7fb93f2a47ab8abc44a9b6a94171950a40f6ba33 (patch) | |
tree | b82af6bb6e2432a38e989ba2bdf44c213f75d2cb /synapse/rest/room.py | |
parent | Update graph.py to use new federation urls (diff) | |
download | synapse-7fb93f2a47ab8abc44a9b6a94171950a40f6ba33.tar.xz |
Add a HomeServer.parse_roomalias() to avoid having to RoomAlias.from_sring(..., hs=hs) - similar to parse_userid()
Diffstat (limited to 'synapse/rest/room.py')
-rw-r--r-- | synapse/rest/room.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/synapse/rest/room.py b/synapse/rest/room.py index 228bc9623d..1fc0c996b8 100644 --- a/synapse/rest/room.py +++ b/synapse/rest/room.py @@ -22,7 +22,6 @@ from synapse.api.events.room import (RoomTopicEvent, MessageEvent, RoomMemberEvent, FeedbackEvent) from synapse.api.constants import Feedback, Membership from synapse.api.streams import PaginationConfig -from synapse.types import RoomAlias import json import logging @@ -150,10 +149,7 @@ class JoinRoomAliasServlet(RestServlet): logger.debug("room_alias: %s", room_alias) - room_alias = RoomAlias.from_string( - urllib.unquote(room_alias), - self.hs - ) + room_alias = self.hs.parse_roomalias(urllib.unquote(room_alias)) handler = self.handlers.room_member_handler ret_dict = yield handler.join_room_alias(user, room_alias) |