Merge branch 'room-enhance-requesthistory' into 'master'

[Room] Request only 10 events on getTimeline

See merge request famedly/famedlysdk!239
This commit is contained in:
Christian Pauly 2020-03-20 08:59:29 +00:00
commit f40322b8d0
2 changed files with 2 additions and 2 deletions

View file

@ -1033,7 +1033,7 @@ class Room {
); );
if (client.store == null) { if (client.store == null) {
prev_batch = ""; prev_batch = "";
await requestHistory(); await requestHistory(historyCount: 10);
} }
return timeline; return timeline;
} }

View file

@ -583,7 +583,7 @@ class FakeMatrixApi extends MockClient {
"origin_server_ts": 1432735824653, "origin_server_ts": 1432735824653,
"unsigned": {"age": 1234} "unsigned": {"age": 1234}
}, },
"/client/r0/rooms/!localpart:server.abc/messages?from=&dir=b&limit=100&filter=%7B%22room%22:%7B%22state%22:%7B%22lazy_load_members%22:true%7D%7D%7D": "/client/r0/rooms/!localpart:server.abc/messages?from=&dir=b&limit=10&filter=%7B%22room%22:%7B%22state%22:%7B%22lazy_load_members%22:true%7D%7D%7D":
(var req) => messagesResponse, (var req) => messagesResponse,
"/client/r0/rooms/!1234:example.com/messages?from=1234&dir=b&limit=100&filter=%7B%22room%22:%7B%22state%22:%7B%22lazy_load_members%22:true%7D%7D%7D": "/client/r0/rooms/!1234:example.com/messages?from=1234&dir=b&limit=100&filter=%7B%22room%22:%7B%22state%22:%7B%22lazy_load_members%22:true%7D%7D%7D":
(var req) => messagesResponse, (var req) => messagesResponse,