summary refs log tree commit diff
path: root/synapse/replication/http/send_event.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-07-23 16:28:00 +0100
committerErik Johnston <erik@matrix.org>2018-07-23 16:28:00 +0100
commit0faa3223cdf996aa18376a7420a43061a6691638 (patch)
tree3a00102320ac528b1e80f7168f44ad4edcdfca50 /synapse/replication/http/send_event.py
parentMerge pull request #3581 from matrix-org/erikj/fixup_stateless (diff)
downloadsynapse-0faa3223cdf996aa18376a7420a43061a6691638.tar.xz
Fix missing attributes on workers.
This was missed during the transition from attribute to getter for
getting state from context.
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],