diff options
author | Erik Johnston <erik@matrix.org> | 2014-10-30 17:00:11 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-10-30 17:00:11 +0000 |
commit | 12ce441e67a40bb73ac5aca0283c2fe4afac4021 (patch) | |
tree | 0a4b6d32dc2a7f149153ad7868d5c5e117335859 /synapse/handlers/federation.py | |
parent | Make federation return the old current state, so that we can use it to do auth (diff) | |
download | synapse-12ce441e67a40bb73ac5aca0283c2fe4afac4021.tar.xz |
Convert event ids to be of the form :example.com
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index da99a4b449..1daeee833b 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -20,9 +20,10 @@ from ._base import BaseHandler from synapse.api.events.room import InviteJoinEvent, RoomMemberEvent from synapse.api.constants import Membership from synapse.util.logutils import log_function -from synapse.federation.pdu_codec import PduCodec, encode_event_id +from synapse.federation.pdu_codec import PduCodec from synapse.api.errors import SynapseError from synapse.util.async import run_on_reactor +from synapse.types import EventID from twisted.internet import defer, reactor @@ -358,7 +359,9 @@ class FederationHandler(BaseHandler): @defer.inlineCallbacks def get_state_for_pdu(self, pdu_id, pdu_origin): - event_id = encode_event_id(pdu_id, pdu_origin) + yield run_on_reactor() + + event_id = EventID.create(pdu_id, pdu_origin, self.hs).to_string() state_groups = yield self.store.get_state_groups( [event_id] |