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 13:57:29 +0000
committerKegan Dougal <kegan@matrix.org>2015-01-08 13:57:40 +0000
commit5720ab59e03d6f5ab48c3be22e8957a8891ea56c (patch)
tree93186a77a9f70485724bd0d419e1339bb7a776cb /synapse/handlers/message.py
parentAdd optional limit to graph script (diff)
downloadsynapse-5720ab59e03d6f5ab48c3be22e8957a8891ea56c.tar.xz
Add 'raw' query parameter to expose the event graph and signatures to savvy clients.
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 7195de98b5..b2bbcfc6e2 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):
+                           feedback=False, trim_events=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
@@ -280,7 +280,9 @@ class MessageHandler(BaseHandler):
                 end_token = now_token.copy_and_replace("room_key", token[1])
 
                 d["messages"] = {
-                    "chunk": [self.hs.serialize_event(m) for m in messages],
+                    "chunk": [
+                    self.hs.serialize_event(m, trim_events) for m in messages
+                    ],
                     "start": start_token.to_string(),
                     "end": end_token.to_string(),
                 }