mirror of https://github.com/vector-im/riot-web
Start decryption process if needed
parent
5b6c5aac16
commit
07d74693af
|
@ -331,6 +331,8 @@ export const Notifier = {
|
|||
if (!this.isSyncing) return; // don't alert for any messages initially
|
||||
if (ev.sender && ev.sender.userId === MatrixClientPeg.get().credentials.userId) return;
|
||||
|
||||
MatrixClientPeg.get().decryptEventIfNeeded(ev);
|
||||
|
||||
// If it's an encrypted event and the type is still 'm.room.encrypted',
|
||||
// it hasn't yet been decrypted, so wait until it is.
|
||||
if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) {
|
||||
|
|
|
@ -395,6 +395,7 @@ export class StopGapWidget extends EventEmitter {
|
|||
}
|
||||
|
||||
private onEvent = (ev: MatrixEvent) => {
|
||||
MatrixClientPeg.get().decryptEventIfNeeded(ev);
|
||||
if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return;
|
||||
if (ev.getRoomId() !== this.eventListenerRoomId) return;
|
||||
this.feedEvent(ev);
|
||||
|
|
Loading…
Reference in New Issue