diff --git a/js/dmDecryptor.js b/js/dmDecryptor.js index ba626166..cd15e47a 100644 --- a/js/dmDecryptor.js +++ b/js/dmDecryptor.js @@ -548,6 +548,8 @@ async function decryptLegacyDm(event, decryptors, actorPubkey) { } } + // Race all decryption attempts to return the first successful result + // This significantly reduces latency compared to sequential attempts try { return await Promise.any(attempts); } catch (aggregateError) {