summary refs log tree commit diff
path: root/synapse/rest/client/v1/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/rest/client/v1/admin.py')
-rw-r--r--synapse/rest/client/v1/admin.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/admin.py b/synapse/rest/client/v1/admin.py
index 0aa83514c8..4aefb94053 100644
--- a/synapse/rest/client/v1/admin.py
+++ b/synapse/rest/client/v1/admin.py
@@ -16,6 +16,8 @@
 from twisted.internet import defer
 
 from synapse.api.errors import AuthError, SynapseError
+from synapse.types import UserID
+
 from base import RestServlet, client_path_pattern
 
 import logging
@@ -28,7 +30,7 @@ class WhoisRestServlet(RestServlet):
 
     @defer.inlineCallbacks
     def on_GET(self, request, user_id):
-        target_user = self.hs.parse_userid(user_id)
+        target_user = UserID.from_string(user_id)
         auth_user = yield self.auth.get_user_by_req(request)
         is_admin = yield self.auth.is_server_admin(auth_user)