mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
log verifying senders in own item
This commit is contained in:
parent
2582600249
commit
dfede83c0b
@ -309,15 +309,16 @@ export class Room extends BaseRoom {
|
|||||||
promises.push(this._roomEncryption.flushPendingRoomKeyShares(this._hsApi, null, log));
|
promises.push(this._roomEncryption.flushPendingRoomKeyShares(this._hsApi, null, log));
|
||||||
}
|
}
|
||||||
if (shouldFetchUnverifiedSenders) {
|
if (shouldFetchUnverifiedSenders) {
|
||||||
const promise = (async () => {
|
const promise = log.wrap("verify senders", (async log => {
|
||||||
const newlyVerifiedDecryption = await decryption.fetchAndVerifyRemainingSenders(this._hsApi, log);
|
const newlyVerifiedDecryption = await decryption.fetchAndVerifyRemainingSenders(this._hsApi, log);
|
||||||
const verifiedEntries = [];
|
const verifiedEntries = [];
|
||||||
const updateCallback = entry => verifiedEntries.push(entry);
|
const updateCallback = entry => verifiedEntries.push(entry);
|
||||||
newlyVerifiedDecryption.applyToEntries(newEntries, updateCallback);
|
newlyVerifiedDecryption.applyToEntries(newEntries, updateCallback);
|
||||||
newlyVerifiedDecryption.applyToEntries(updatedEntries, updateCallback);
|
newlyVerifiedDecryption.applyToEntries(updatedEntries, updateCallback);
|
||||||
|
log.set("verifiedEntries", verifiedEntries.length);
|
||||||
this._timeline?.replaceEntries(verifiedEntries);
|
this._timeline?.replaceEntries(verifiedEntries);
|
||||||
this._observedEvents?.updateEvents(verifiedEntries);
|
this._observedEvents?.updateEvents(verifiedEntries);
|
||||||
});
|
}));
|
||||||
promises.push(promise);
|
promises.push(promise);
|
||||||
}
|
}
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
|
Loading…
Reference in New Issue
Block a user