1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +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

@@ -216,10 +216,14 @@ LocalIndexedDBStoreBackend.prototype = {
request.onerror = (err) => {
reject(err);
};
}).then((membershipEvents) => {
console.log(`LL: got ${membershipEvents.length} membershipEvents from storage for room ${roomId} ...`);
return membershipEvents;
});
},
setOutOfBandMembers: function(roomId, membershipEvents) {
console.log(`LL: backend about to store ${membershipEvents.length} members for ${roomId}`);
function ignoreResult() {};
// run everything in a promise so anything that throws will reject
return new Promise((resolve) =>{
@@ -230,6 +234,8 @@ LocalIndexedDBStoreBackend.prototype = {
return putPromise.then(ignoreResult);
});
resolve(Promise.all(puts).then(ignoreResult));
}).then(() => {
console.log(`LL: backend done storing for ${roomId}!`);
});
},