summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-10-30 17:00:11 +0000
committerErik Johnston <erik@matrix.org>2014-10-30 17:00:11 +0000
commit12ce441e67a40bb73ac5aca0283c2fe4afac4021 (patch)
tree0a4b6d32dc2a7f149153ad7868d5c5e117335859 /synapse/handlers
parentMake federation return the old current state, so that we can use it to do auth (diff)
downloadsynapse-12ce441e67a40bb73ac5aca0283c2fe4afac4021.tar.xz
Convert event ids to be of the form :example.com
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/federation.py7
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]