summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-11-19 16:38:40 +0000
committerMark Haines <mark.haines@matrix.org>2014-11-19 16:38:40 +0000
commitc5eabe3143bc3398961ed80da041f28e545386bf (patch)
treedf8ab480f1df3ddb2e05cefb741f10ed990d37fc /synapse/federation
parentPreserve logging context in a few more places, drop the logging context after... (diff)
downloadsynapse-c5eabe3143bc3398961ed80da041f28e545386bf.tar.xz
replace user_id with sender
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/replication.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py
index 2ed303e12d..65a53ae17c 100644
--- a/synapse/federation/replication.py
+++ b/synapse/federation/replication.py
@@ -582,6 +582,9 @@ class ReplicationLayer(object):
         #TODO: Check we have all the PDU keys here
         pdu_json.setdefault("hashes", {})
         pdu_json.setdefault("signatures", {})
+        sender = pdu_json.pop("sender", None)
+        if sender is not None:
+            pdu_json["user_id"] = sender
         state_hash = pdu_json.get("unsigned", {}).pop("state_hash", None)
         if state_hash is not None:
             pdu_json["state_hash"] = state_hash