diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-21 15:06:00 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-21 15:06:00 +0100 |
commit | 063e1b22e62915ec77bfd3cb9477c29600acb568 (patch) | |
tree | fc577d2546d0b8eda865253672825e7ca7d9b475 | |
parent | Wait for getting a Join in response to an invite/join dance. (diff) | |
download | synapse-063e1b22e62915ec77bfd3cb9477c29600acb568.tar.xz |
Stop internal keys from getting into SynapseEvents
-rw-r--r-- | synapse/api/events/__init__.py | 1 | ||||
-rw-r--r-- | synapse/storage/_base.py | 5 |
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"] |