diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-01-23 13:41:55 +0000 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-01-23 13:41:55 +0000 |
commit | f7cb6042117fd54748ec771337a4b04fe8498ac8 (patch) | |
tree | 62fece1cc473923d5bd4e72dac9035ca9e81ea1f /synapse/handlers/_base.py | |
parent | Merge pull request #31 from matrix-org/client_api_resource (diff) | |
parent | Remove hs.parse_eventid (diff) | |
download | synapse-f7cb6042117fd54748ec771337a4b04fe8498ac8.tar.xz |
Merge pull request #32 from matrix-org/remove_parse_id_from_hs
Remove parse id from hs
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( |