webclient: You can now paginate in rooms. Defaults to 10 messages, with a button to get more (needs to be hooked into infini-scrolling).

This commit is contained in:
Kegan Dougal 2014-08-14 17:23:47 +01:00
parent fef3183461
commit 30da8c81c7
4 changed files with 74 additions and 21 deletions

View file

@ -212,6 +212,17 @@ angular.module('matrixService', [])
path = path.replace("$room_id", room_id);
return doRequest("GET", path);
},
paginateBackMessages: function(room_id, from_token, limit) {
var path = "/rooms/$room_id/messages/list";
path = path.replace("$room_id", room_id);
var params = {
from: from_token,
to: "START",
limit: limit
};
return doRequest("GET", path, params);
},
// get a list of public rooms on your home server
publicRooms: function() {