summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-18 16:20:21 +0100
committerErik Johnston <erik@matrix.org>2014-08-18 16:20:21 +0100
commit4eb8f84aa8fc735e228f66d11c355625bb14c1cf (patch)
treef61a3382178abf2193c05949d034a9b3ff52c9d1 /synapse/handlers/room.py
parentSQL doesn't allow AUTOINCREMENT on non PRIMARY KEY columns. (diff)
downloadsynapse-4eb8f84aa8fc735e228f66d11c355625bb14c1cf.tar.xz
Make snapshot_all_rooms return results in the correct form, including start and end tokens.
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index cdc98d2b08..9e10235fa0 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -269,11 +269,16 @@ class MessageHandler(BaseHandler):
             if event.membership != Membership.JOIN:
                 continue
             try:
-                messages = yield self.store.get_recent_events_for_room(
+                messages, token = yield self.store.get_recent_events_for_room(
                     event.room_id,
                     limit=50,
                 )
-                d["messages"] = [m.get_dict() for m in messages]
+
+                d["messages"] = {
+                    "chunk": [m.get_dict() for m in messages],
+                    "start": token[0],
+                    "end": token[1],
+                }
             except:
                 pass