Stop internal keys from getting into SynapseEvents
This commit is contained in:
parent
1587ea26fe
commit
063e1b22e6
|
@ -51,6 +51,7 @@ class SynapseEvent(JsonEncodedObject):
|
||||||
"depth",
|
"depth",
|
||||||
"destinations",
|
"destinations",
|
||||||
"origin",
|
"origin",
|
||||||
|
"outlier",
|
||||||
]
|
]
|
||||||
|
|
||||||
required_keys = [
|
required_keys = [
|
||||||
|
|
|
@ -294,6 +294,11 @@ class SQLBaseStore(object):
|
||||||
|
|
||||||
def _parse_event_from_row(self, row_dict):
|
def _parse_event_from_row(self, row_dict):
|
||||||
d = copy.deepcopy({k: v for k, v in row_dict.items() if v})
|
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.update(json.loads(row_dict["unrecognized_keys"]))
|
||||||
d["content"] = json.loads(d["content"])
|
d["content"] = json.loads(d["content"])
|
||||||
del d["unrecognized_keys"]
|
del d["unrecognized_keys"]
|
||||||
|
|
Loading…
Reference in New Issue