diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-01-23 11:47:15 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-01-23 11:47:15 +0000 |
commit | 5759bec43cb52862a8d455afb8cd9d1c5660bc3d (patch) | |
tree | b8faefa2249086e8d9c8a846b442582e98ca873e /synapse/rest/client/v1/room.py | |
parent | Merge pull request #31 from matrix-org/client_api_resource (diff) | |
download | synapse-5759bec43cb52862a8d455afb8cd9d1c5660bc3d.tar.xz |
Replace hs.parse_userid with UserID.from_string
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r-- | synapse/rest/client/v1/room.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 48bba2a5f3..c5837b3403 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -20,6 +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 import json import logging @@ -289,7 +290,7 @@ class RoomMemberListRestServlet(RestServlet): for event in members["chunk"]: # FIXME: should probably be state_key here, not user_id - target_user = self.hs.parse_userid(event["user_id"]) + target_user = UserID.from_string(event["user_id"]) # Presence is an optional cache; don't fail if we can't fetch it try: presence_handler = self.handlers.presence_handler @@ -478,7 +479,7 @@ class RoomTypingRestServlet(RestServlet): auth_user = yield self.auth.get_user_by_req(request) room_id = urllib.unquote(room_id) - target_user = self.hs.parse_userid(urllib.unquote(user_id)) + target_user = UserID.from_string(urllib.unquote(user_id)) content = _parse_json(request) |