summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/events.py4
-rw-r--r--synapse/handlers/message.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index 4e805606b8..c9ade253dd 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -47,7 +47,7 @@ class EventStreamHandler(BaseHandler):
     @defer.inlineCallbacks
     @log_function
     def get_stream(self, auth_user_id, pagin_config, timeout=0,
-                   trim_events=True):
+                   as_client_event=True):
         auth_user = self.hs.parse_userid(auth_user_id)
 
         try:
@@ -80,7 +80,7 @@ class EventStreamHandler(BaseHandler):
                 )
 
             chunks = [
-                self.hs.serialize_event(e, trim_events) for e in events
+                self.hs.serialize_event(e, as_client_event) for e in events
             ]
 
             chunk = {
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(),