mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
filter encrypted events before deciding to decrypt or not
This commit is contained in:
parent
9702c4fd64
commit
3bfe52b1dc
@ -183,11 +183,10 @@ export class Room extends EventEmitter {
|
||||
events = events.concat(retryEntries.map(entry => entry.event));
|
||||
}
|
||||
}
|
||||
|
||||
if (events.length) {
|
||||
const eventsToDecrypt = events.filter(event => {
|
||||
return event?.type === EVENT_ENCRYPTED_TYPE;
|
||||
});
|
||||
const eventsToDecrypt = events.filter(event => {
|
||||
return event?.type === EVENT_ENCRYPTED_TYPE;
|
||||
});
|
||||
if (eventsToDecrypt.length) {
|
||||
decryptPreparation = await roomEncryption.prepareDecryptAll(
|
||||
eventsToDecrypt, newKeys, DecryptionSource.Sync, txn);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user