You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
only consider rooms when paginating EventTimelines with rooms
This commit is contained in:
@@ -1704,11 +1704,6 @@ MatrixClient.prototype.paginateEventTimeline = function(eventTimeline, opts) {
|
||||
}
|
||||
}
|
||||
|
||||
var room = this.getRoom(eventTimeline.getRoomId());
|
||||
if (!room) {
|
||||
throw new Error("Unknown room " + eventTimeline.getRoomId());
|
||||
}
|
||||
|
||||
var dir = backwards ? EventTimeline.BACKWARDS : EventTimeline.FORWARDS;
|
||||
|
||||
var token = eventTimeline.getPaginationToken(dir);
|
||||
@@ -1766,6 +1761,11 @@ MatrixClient.prototype.paginateEventTimeline = function(eventTimeline, opts) {
|
||||
eventTimeline._paginationRequests[dir] = promise;
|
||||
}
|
||||
else {
|
||||
var room = this.getRoom(eventTimeline.getRoomId());
|
||||
if (!room) {
|
||||
throw new Error("Unknown room " + eventTimeline.getRoomId());
|
||||
}
|
||||
|
||||
var path = utils.encodeUri(
|
||||
"/rooms/$roomId/messages", {$roomId: eventTimeline.getRoomId()}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user