mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
also fetch unknown sender keys after decrypting entries outside of sync
This commit is contained in:
parent
dc25f96e73
commit
6123d794da
@ -166,6 +166,16 @@ export class BaseRoom extends EventEmitter {
|
|||||||
if (this._observedEvents) {
|
if (this._observedEvents) {
|
||||||
this._observedEvents.updateEvents(entries);
|
this._observedEvents.updateEvents(entries);
|
||||||
}
|
}
|
||||||
|
if (isTimelineOpen && decryption.hasUnverifiedSenders) {
|
||||||
|
// verify missing senders async and update timeline once done so we don't delay rendering with network requests
|
||||||
|
log.wrapDetached("fetch unknown senders keys", async () => {
|
||||||
|
const newlyVerifiedDecryption = await decryption.fetchAndVerifyRemainingSenders(this._hsApi, log);
|
||||||
|
const verifiedEntries = [];
|
||||||
|
newlyVerifiedDecryption.applyToEntries(entries, entry => verifiedEntries.push(entry));
|
||||||
|
this._timeline?.replaceEntries(verifiedEntries);
|
||||||
|
this._observedEvents?.updateEvents(verifiedEntries);
|
||||||
|
});
|
||||||
|
}
|
||||||
}, ensureLogItem(log));
|
}, ensureLogItem(log));
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user