summary refs log tree commit diff
path: root/synapse/handlers/events.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/events.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/events.py')
-rw-r--r--synapse/handlers/events.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index 808219bd10..4e805606b8 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -46,7 +46,8 @@ class EventStreamHandler(BaseHandler):
 
     @defer.inlineCallbacks
     @log_function
-    def get_stream(self, auth_user_id, pagin_config, timeout=0):
+    def get_stream(self, auth_user_id, pagin_config, timeout=0,
+                   trim_events=True):
         auth_user = self.hs.parse_userid(auth_user_id)
 
         try:
@@ -78,7 +79,9 @@ class EventStreamHandler(BaseHandler):
                     auth_user, room_ids, pagin_config, timeout
                 )
 
-            chunks = [self.hs.serialize_event(e) for e in events]
+            chunks = [
+                self.hs.serialize_event(e, trim_events) for e in events
+            ]
 
             chunk = {
                 "chunk": chunks,