summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-21 15:06:00 +0100
committerErik Johnston <erik@matrix.org>2014-08-21 15:06:00 +0100
commit063e1b22e62915ec77bfd3cb9477c29600acb568 (patch)
treefc577d2546d0b8eda865253672825e7ca7d9b475
parentWait for getting a Join in response to an invite/join dance. (diff)
downloadsynapse-063e1b22e62915ec77bfd3cb9477c29600acb568.tar.xz
Stop internal keys from getting into SynapseEvents
-rw-r--r--synapse/api/events/__init__.py1
-rw-r--r--synapse/storage/_base.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py
index 921fd08832..aa04dbece7 100644
--- a/synapse/api/events/__init__.py
+++ b/synapse/api/events/__init__.py
@@ -51,6 +51,7 @@ class SynapseEvent(JsonEncodedObject):
         "depth",
         "destinations",
         "origin",
+        "outlier",
     ]
 
     required_keys = [
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 36cc57c1b8..75aab2d3b9 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -294,6 +294,11 @@ class SQLBaseStore(object):
 
     def _parse_event_from_row(self, row_dict):
         d = copy.deepcopy({k: v for k, v in row_dict.items() if v})
+
+        d.pop("stream_ordering", None)
+        d.pop("topological_ordering", None)
+        d.pop("processed", None)
+
         d.update(json.loads(row_dict["unrecognized_keys"]))
         d["content"] = json.loads(d["content"])
         del d["unrecognized_keys"]