You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
support paginating relations
This commit is contained in:
@@ -3966,9 +3966,17 @@ MatrixClient.prototype.getCanResetTimelineCallback = function() {
|
||||
};
|
||||
|
||||
MatrixClient.prototype.relations =
|
||||
async function(roomId, eventId, relationType, eventType) {
|
||||
const events = await this.fetchRelations(roomId, eventId, relationType, eventType);
|
||||
return events.map(this.getEventMapper());
|
||||
async function(roomId, eventId, relationType, eventType, opts = {}) {
|
||||
const result = await this.fetchRelations(
|
||||
roomId,
|
||||
eventId,
|
||||
relationType,
|
||||
eventType,
|
||||
opts);
|
||||
return {
|
||||
events: result.chunk.map(this.getEventMapper()),
|
||||
nextBatch: result.next_batch,
|
||||
};
|
||||
};
|
||||
|
||||
function setupCallEventHandler(client) {
|
||||
|
||||
Reference in New Issue
Block a user