summary refs log tree commit diff
path: root/synapse/events/utils.py
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2019-07-05 17:20:02 +0100
committerGitHub <noreply@github.com>2019-07-05 17:20:02 +0100
commitad8b909ce98cce5e955b10a3cbe04f3e868ecb70 (patch)
tree215689c8d88f8acdb4f5ff0b7bcb990d614437dc /synapse/events/utils.py
parentRemove support for invite_3pid_guest. (#5625) (diff)
downloadsynapse-ad8b909ce98cce5e955b10a3cbe04f3e868ecb70.tar.xz
Add origin_server_ts and sender fields to m.replace (#5613)
Riot team would like some extra fields as part of m.replace, so here you go.

Fixes: #5598
Diffstat (limited to 'synapse/events/utils.py')
-rw-r--r--synapse/events/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py
index f24f0c16f0..987de5cab7 100644
--- a/synapse/events/utils.py
+++ b/synapse/events/utils.py
@@ -392,7 +392,11 @@ class EventClientSerializer(object):
                     serialized_event["content"].pop("m.relates_to", None)
 
                 r = serialized_event["unsigned"].setdefault("m.relations", {})
-                r[RelationTypes.REPLACE] = {"event_id": edit.event_id}
+                r[RelationTypes.REPLACE] = {
+                    "event_id": edit.event_id,
+                    "origin_server_ts": edit.origin_server_ts,
+                    "sender": edit.sender,
+                }
 
         defer.returnValue(serialized_event)