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/handlers/_base.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/handlers/_base.py')
-rw-r--r-- | synapse/handlers/_base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py index f33d17a31e..1773fa20aa 100644 --- a/synapse/handlers/_base.py +++ b/synapse/handlers/_base.py @@ -19,6 +19,7 @@ from synapse.api.errors import LimitExceededError, SynapseError from synapse.util.async import run_on_reactor from synapse.crypto.event_signing import add_hashes_and_signatures from synapse.api.constants import Membership, EventTypes +from synapse.types import UserID import logging @@ -113,7 +114,7 @@ class BaseHandler(object): if event.type == EventTypes.Member: if event.content["membership"] == Membership.INVITE: - invitee = self.hs.parse_userid(event.state_key) + invitee = UserID.from_string(event.state_key) if not self.hs.is_mine(invitee): # TODO: Can we add signature from remote server in a nicer # way? If we have been invited by a remote server, we need @@ -134,7 +135,7 @@ class BaseHandler(object): if k[0] == EventTypes.Member: if s.content["membership"] == Membership.JOIN: destinations.add( - self.hs.parse_userid(s.state_key).domain + UserID.from_string(s.state_key).domain ) except SynapseError: logger.warn( |