forked from mystiq/hydrogen-web
add comment about possible future optimization
This commit is contained in:
parent
1278288a42
commit
2943cb525f
1 changed files with 4 additions and 0 deletions
|
@ -76,6 +76,10 @@ export class Room extends BaseRoom {
|
|||
let eventsToDecrypt = roomResponse?.timeline?.events || [];
|
||||
// when new keys arrive, also see if any older events can now be retried to decrypt
|
||||
if (newKeys) {
|
||||
// TODO: if a key is considered by roomEncryption.prepareDecryptAll to use for decryption,
|
||||
// key.eventIds will be set. We could somehow try to reuse that work, but retrying also needs
|
||||
// to happen if a key is not needed to decrypt this sync or there are indeed no encrypted messages
|
||||
// in this sync at all.
|
||||
retryEntries = await this._getSyncRetryDecryptEntries(newKeys, roomEncryption, txn);
|
||||
if (retryEntries.length) {
|
||||
log.set("retry", retryEntries.length);
|
||||
|
|
Loading…
Reference in a new issue