diff options
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 9 |
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 |