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

add logging, should be useful as long as not merged into develop

This commit is contained in:
Bruno Windels
2018-07-31 16:10:53 +02:00
parent 86105611fc
commit a8c73f7a4d
3 changed files with 13 additions and 0 deletions

View File

@@ -767,6 +767,7 @@ MatrixClient.prototype._loadMembers = async function(room) {
const lastEventId = room.getLastEventId();
const response = await this.members(roomId, "join", "leave", lastEventId);
rawMembersEvents = response.chunk;
console.log(`LL: got ${rawMembersEvents.length} members from server`);
}
const memberEvents = rawMembersEvents.map(this.getEventMapper());
return {memberEvents, fromServer};
@@ -807,8 +808,12 @@ MatrixClient.prototype.loadRoomMembersIfNeeded = async function(roomId) {
// scenario for DM's where all the members would likely
// be known without lazy loading.
if (rawMembersEvents.length) {
console.log(`LL: telling backend to store ${rawMembersEvents.length} members`);
await this.store.setOutOfBandMembers(roomId, rawMembersEvents);
}
else {
console.log(`LL: no members needed to be stored`);
}
}
};