Don't notify for bad encrypted messages
Continue to wait for decryption if the decryption process failed. Because we weren't doing this, the first message in a megolm session was generally failing to decrypt the first time because the keys often arrive after the message. Fixes https://github.com/vector-im/riot-web/issues/6284 This is is small & safe enough that we may want to consider putting it in 0.14 if we're cutting another RC.
This commit is contained in:
parent
35d25ac0ea
commit
d6b3083c2f
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue