summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-01-08 14:27:04 +0000
committerKegan Dougal <kegan@matrix.org>2015-01-08 14:28:08 +0000
commitedb557b2ad98d3260caaba41ef2278b3eafc7e85 (patch)
treed3c5bceb3f5c9fb142c4ff6f8ab23b095f4eae37 /synapse/handlers/message.py
parentAdd missing continuation indent. (diff)
downloadsynapse-edb557b2ad98d3260caaba41ef2278b3eafc7e85.tar.xz
Return the raw federation event rather than adding extra keys for federation data.
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 9b20e4f50e..30f5a08b59 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -211,7 +211,7 @@ class MessageHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def snapshot_all_rooms(self, user_id=None, pagin_config=None,
-                           feedback=False, trim_events=True):
+                           feedback=False, as_client_event=True):
         """Retrieve a snapshot of all rooms the user is invited or has joined.
 
         This snapshot may include messages for all rooms where the user is
@@ -222,6 +222,7 @@ class MessageHandler(BaseHandler):
             pagin_config (synapse.api.streams.PaginationConfig): The pagination
             config used to determine how many messages *PER ROOM* to return.
             feedback (bool): True to get feedback along with these messages.
+            as_client_event (bool): True to get events in client-server format.
         Returns:
             A list of dicts with "room_id" and "membership" keys for all rooms
             the user is currently invited or joined in on. Rooms where the user
@@ -281,7 +282,7 @@ class MessageHandler(BaseHandler):
 
                 d["messages"] = {
                     "chunk": [
-                        self.hs.serialize_event(m, trim_events)
+                        self.hs.serialize_event(m, as_client_event)
                         for m in messages
                     ],
                     "start": start_token.to_string(),