From 1e166470abf9a765eb66f5ea02382143f031e1fe Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 26 Apr 2017 16:23:30 +0100 Subject: Fix tests --- synapse/events/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'synapse/events/utils.py') 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 -- cgit 1.4.1