You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
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:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user