summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-04-26 16:23:30 +0100
committerErik Johnston <erik@matrix.org>2017-04-26 16:23:30 +0100
commit1e166470abf9a765eb66f5ea02382143f031e1fe (patch)
tree506c4fa8463344e1609c429eb84ebac0acd3ccd8
parentFix invite state to always include all events (diff)
downloadsynapse-1e166470abf9a765eb66f5ea02382143f031e1fe.tar.xz
Fix tests
Diffstat (limited to '')
-rw-r--r--synapse/events/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py
index 7ca7796558..c42b73d11a 100644
--- a/synapse/events/utils.py
+++ b/synapse/events/utils.py
@@ -266,6 +266,9 @@ def serialize_event(e, time_now_ms, as_client_event=True,
             if txn_id is not None:
                 d["unsigned"]["transaction_id"] = txn_id
 
+    if not is_invite:
+        d["unsigned"].pop("invite_room_state", None)
+
     if as_client_event:
         d = event_format(d)
 
@@ -275,7 +278,4 @@ def serialize_event(e, time_now_ms, as_client_event=True,
             raise TypeError("only_event_fields must be a list of strings")
         d = only_fields(d, only_event_fields)
 
-    if not is_invite:
-        d["unsigned"].pop("invite_room_state", None)
-
     return d