Merge PDUs and Events into one object

This commit is contained in:
Mark Haines 2014-11-14 21:25:02 +00:00
parent 8c2b5ea7c4
commit cb4b6c844a
10 changed files with 91 additions and 212 deletions

View file

@ -117,6 +117,12 @@ class SynapseEvent(JsonEncodedObject):
"""
raise NotImplementedError("get_content_template not implemented.")
def get_pdu_json(self):
pdu_json = self.get_full_dict()
pdu_json.pop("destination", None)
pdu_json.pop("outlier", None)
return pdu_json
class SynapseStateEvent(SynapseEvent):

View file

@ -42,6 +42,8 @@ def prune_event(event):
"prev_events",
"prev_state",
"auth_events",
"origin",
"origin_server_ts",
]
new_content = {}