summary refs log tree commit diff
path: root/synapse/replication/http/send_event.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-07-23 16:44:42 +0100
committerGitHub <noreply@github.com>2018-07-23 16:44:42 +0100
commita646bdc6705785a4634ce60e70c6113c1b6e8234 (patch)
tree3cb07ec6a145402f7661540d2779e94dffa7355b /synapse/replication/http/send_event.py
parentMerge pull request #3581 from matrix-org/erikj/fixup_stateless (diff)
parentNewsfile (diff)
downloadsynapse-a646bdc6705785a4634ce60e70c6113c1b6e8234.tar.xz
Merge pull request #3582 from matrix-org/erikj/fixup_stateless
Fix missing attributes on workers.
Diffstat (limited to 'synapse/replication/http/send_event.py')
-rw-r--r--synapse/replication/http/send_event.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/replication/http/send_event.py b/synapse/replication/http/send_event.py
index 2eede54792..5227bc333d 100644
--- a/synapse/replication/http/send_event.py
+++ b/synapse/replication/http/send_event.py
@@ -34,12 +34,13 @@ logger = logging.getLogger(__name__)
 
 
 @defer.inlineCallbacks
-def send_event_to_master(clock, client, host, port, requester, event, context,
+def send_event_to_master(clock, store, client, host, port, requester, event, context,
                          ratelimit, extra_users):
     """Send event to be handled on the master
 
     Args:
         clock (synapse.util.Clock)
+        store (DataStore)
         client (SimpleHttpClient)
         host (str): host of master
         port (int): port on master listening for HTTP replication
@@ -53,11 +54,13 @@ def send_event_to_master(clock, client, host, port, requester, event, context,
         host, port, event.event_id,
     )
 
+    serialized_context = yield context.serialize(event, store)
+
     payload = {
         "event": event.get_pdu_json(),
         "internal_metadata": event.internal_metadata.get_dict(),
         "rejected_reason": event.rejected_reason,
-        "context": context.serialize(event),
+        "context": serialized_context,
         "requester": requester.serialize(),
         "ratelimit": ratelimit,
         "extra_users": [u.to_string() for u in extra_users],