forked from mystiq/hydrogen-web
no need to call decrypt when there are no events
This commit is contained in:
parent
408ff3322d
commit
4401012312
1 changed files with 3 additions and 0 deletions
|
@ -64,6 +64,9 @@ export class DeviceMessageHandler {
|
|||
}
|
||||
const readTxn = await this._storage.readTxn([this._storage.storeNames.session]);
|
||||
const pendingEvents = await this._getPendingEvents(readTxn);
|
||||
if (pendingEvents.length === 0) {
|
||||
return;
|
||||
}
|
||||
// only know olm for now
|
||||
const olmEvents = pendingEvents.filter(e => e.content?.algorithm === OLM_ALGORITHM);
|
||||
const decryptChanges = await this._olmDecryption.decryptAll(olmEvents);
|
||||
|
|
Loading…
Reference in a new issue