mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -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
|
@ -18,6 +18,7 @@ from twisted.internet import defer
|
|||
from synapse.api.errors import SynapseError, AuthError, CodeMessageException
|
||||
from synapse.api.constants import EventTypes, Membership
|
||||
from synapse.util.logcontext import PreserveLoggingContext
|
||||
from synapse.types import UserID
|
||||
|
||||
from ._base import BaseHandler
|
||||
|
||||
|
@ -169,7 +170,7 @@ class ProfileHandler(BaseHandler):
|
|||
|
||||
@defer.inlineCallbacks
|
||||
def on_profile_query(self, args):
|
||||
user = self.hs.parse_userid(args["user_id"])
|
||||
user = UserID.from_string(args["user_id"])
|
||||
if not self.hs.is_mine(user):
|
||||
raise SynapseError(400, "User is not hosted on this Home Server")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue