summary refs log tree commit diff
path: root/synapse/api/events/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-06 02:23:36 +0100
committerErik Johnston <erik@matrix.org>2014-09-06 02:23:36 +0100
commit781ff713ba65e9a8075063ee5112479afcb412ed (patch)
tree1df45adf38713cac9d045c43296f1026897c91c6 /synapse/api/events/__init__.py
parentDocument new invite key added to createRoom api (diff)
downloadsynapse-781ff713ba65e9a8075063ee5112479afcb412ed.tar.xz
When getting a state event also include the previous content
Diffstat (limited to 'synapse/api/events/__init__.py')
-rw-r--r--synapse/api/events/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py
index f95468fc65..5f300de108 100644
--- a/synapse/api/events/__init__.py
+++ b/synapse/api/events/__init__.py
@@ -157,7 +157,12 @@ class SynapseEvent(JsonEncodedObject):
 
 
 class SynapseStateEvent(SynapseEvent):
-     def __init__(self, **kwargs):
+
+    valid_keys = SynapseEvent.valid_keys + [
+        "prev_content",
+    ]
+
+    def __init__(self, **kwargs):
         if "state_key" not in kwargs:
             kwargs["state_key"] = ""
         super(SynapseStateEvent, self).__init__(**kwargs)