1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

Merge pull request #1818 from matrix-org/dbkr/dont_notify_bad_encrypted

Don't notify for bad encrypted messages
This commit is contained in:
David Baker
2018-03-29 18:33:44 +01:00
committed by GitHub

View File

@@ -256,6 +256,10 @@ const Notifier = {
}, },
onEventDecrypted: function(ev) { onEventDecrypted: function(ev) {
// 'decrypted' means the decryption process has finished: it may have failed,
// in which case it might decrypt soon if the keys arrive
if (ev.isDecryptionFailure()) return;
const idx = this.pendingEncryptedEventIds.indexOf(ev.getId()); const idx = this.pendingEncryptedEventIds.indexOf(ev.getId());
if (idx === -1) return; if (idx === -1) return;