1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

fix room not having access to event mapper + tests

This commit is contained in:
Bruno Windels
2018-07-25 12:35:34 +02:00
parent 48c3dcc08a
commit 5fcf9481b3
3 changed files with 36 additions and 6 deletions

View File

@@ -770,7 +770,9 @@ MatrixClient.prototype.loadRoomMembersIfNeeded = async function(roomId) {
const lastEventId = room.getLastEventId();
const responsePromise = this.members(roomId, "join", "leave", lastEventId);
const eventsPromise = responsePromise.then((response) => response.chunk);
const eventsPromise = responsePromise.then((response) => {
return response.chunk.map(this.getEventMapper())
});
await room.loadOutOfBandMembers(eventsPromise);
};