summary refs log tree commit diff
path: root/synapse/events/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-21 11:39:38 +0100
committerErik Johnston <erik@matrix.org>2015-08-21 11:39:38 +0100
commit745b72660acd6760334b7be51ad2d91eef2e0257 (patch)
tree3001ef666fa2c2f3d658f5e60dd3b08e39337be6 /synapse/events/__init__.py
parentReturn fully qualified user_id as per spec (diff)
parentFix bug where we didn't correctly serialize the redacted_because key over fed... (diff)
downloadsynapse-745b72660acd6760334b7be51ad2d91eef2e0257.tar.xz
Merge branch 'release-v0.10.0' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'synapse/events/__init__.py')
-rw-r--r--synapse/events/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 39ce4f7c42..3fb4b5e791 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -90,7 +90,7 @@ class EventBase(object):
         d = dict(self._event_dict)
         d.update({
             "signatures": self.signatures,
-            "unsigned": self.unsigned,
+            "unsigned": dict(self.unsigned),
         })
 
         return d
@@ -109,6 +109,9 @@ class EventBase(object):
             pdu_json.setdefault("unsigned", {})["age"] = int(age)
             del pdu_json["unsigned"]["age_ts"]
 
+        # This may be a frozen event
+        pdu_json["unsigned"].pop("redacted_because", None)
+
         return pdu_json
 
     def __set__(self, instance, value):