mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 03:34:49 -04:00
Replace hs.parse_userid with UserID.from_string
This commit is contained in:
parent
7dfd99f163
commit
5759bec43c
31 changed files with 145 additions and 133 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue