summary refs log tree commit diff
path: root/synapse/api/events/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-17 10:29:23 +0000
committerErik Johnston <erik@matrix.org>2014-11-17 10:29:23 +0000
commit8c45c8b8b98c5a0e98bf4051994fed9847aadd08 (patch)
tree12c7ac945749c68b81e3ae55c39dfd58ae824bf0 /synapse/api/events/__init__.py
parentMove getLastMessage to modelService. (diff)
parentMerge remote-tracking branch 'origin/develop' into merge_pdu_event_objects (diff)
downloadsynapse-8c45c8b8b98c5a0e98bf4051994fed9847aadd08.tar.xz
Merge pull request #14 from matrix-org/merge_pdu_event_objects
Merge pdu and event objects
Diffstat (limited to 'synapse/api/events/__init__.py')
-rw-r--r--synapse/api/events/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py
index 1d8bed2906..63c0bd7ae7 100644
--- a/synapse/api/events/__init__.py
+++ b/synapse/api/events/__init__.py
@@ -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):