summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-04 11:27:59 +0000
committerErik Johnston <erik@matrix.org>2014-12-04 11:27:59 +0000
commit5d7c9ab7898f2721aa3f60ab76c53dc44322be77 (patch)
tree7a6209af97b35e8d62db575327217c23592e68af /synapse/handlers/federation.py
parentWIP for new way of managing events. (diff)
downloadsynapse-5d7c9ab7898f2721aa3f60ab76c53dc44322be77.tar.xz
Begin converting things to use the new Event structure
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r--synapse/handlers/federation.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 925eb5376e..7bd36e415e 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -76,7 +76,7 @@ class FederationHandler(BaseHandler):
 
     @log_function
     @defer.inlineCallbacks
-    def handle_new_event(self, event, snapshot):
+    def handle_new_event(self, event, snapshot, destinations):
         """ Takes in an event from the client to server side, that has already
         been authed and handled by the state module, and sends it to any
         remote home servers that may be interested.
@@ -92,12 +92,7 @@ class FederationHandler(BaseHandler):
 
         yield run_on_reactor()
 
-        pdu = event
-
-        if not hasattr(pdu, "destinations") or not pdu.destinations:
-            pdu.destinations = []
-
-        yield self.replication_layer.send_pdu(pdu)
+        yield self.replication_layer.send_pdu(event, destinations)
 
     @log_function
     @defer.inlineCallbacks