summary refs log tree commit diff
path: root/synapse/events/utils.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-01-29 22:00:33 +0000
committerErik Johnston <erik@matrix.org>2019-01-29 22:00:33 +0000
commita696c48133d9f9a94f8b078aeacce0bef0d693b4 (patch)
tree8137f14c734d351f52af038265103f275276646a /synapse/events/utils.py
parentUpdate synapse/storage/events_worker.py (diff)
parentMerge pull request #4483 from matrix-org/erikj/event_v2 (diff)
downloadsynapse-a696c48133d9f9a94f8b078aeacce0bef0d693b4.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/redactions_eiah
Diffstat (limited to 'synapse/events/utils.py')
-rw-r--r--synapse/events/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py
index 63f693f259..07fccdd8f9 100644
--- a/synapse/events/utils.py
+++ b/synapse/events/utils.py
@@ -267,6 +267,7 @@ def serialize_event(e, time_now_ms, as_client_event=True,
     Returns:
         dict
     """
+
     # FIXME(erikj): To handle the case of presence events and the like
     if not isinstance(e, EventBase):
         return e
@@ -276,6 +277,8 @@ def serialize_event(e, time_now_ms, as_client_event=True,
     # Should this strip out None's?
     d = {k: v for k, v in e.get_dict().items()}
 
+    d["event_id"] = e.event_id
+
     if "age_ts" in d["unsigned"]:
         d["unsigned"]["age"] = time_now_ms - d["unsigned"]["age_ts"]
         del d["unsigned"]["age_ts"]