From d50e559f97a3d3a6420b4e6c60fbca7a9b3e85b1 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 25 Jun 2021 10:21:28 +0100 Subject: [PATCH] MegolmDecryption::deviceId is not a valid field, sub it out for undefined as it isn't used meaningfully anyhow --- src/crypto/algorithms/megolm.ts | 6 +++--- src/crypto/olmlib.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/crypto/algorithms/megolm.ts b/src/crypto/algorithms/megolm.ts index af80a9489..e111703a8 100644 --- a/src/crypto/algorithms/megolm.ts +++ b/src/crypto/algorithms/megolm.ts @@ -1539,7 +1539,7 @@ class MegolmDecryption extends DecryptionAlgorithm { await olmlib.encryptMessageForDevice( encryptedContent.ciphertext, this.userId, - this.deviceId, + undefined, this.olmDevice, sender, device, @@ -1619,7 +1619,7 @@ class MegolmDecryption extends DecryptionAlgorithm { return this.olmlib.encryptMessageForDevice( encryptedContent.ciphertext, this.userId, - this.deviceId, + undefined, this.olmDevice, userId, deviceInfo, @@ -1782,7 +1782,7 @@ class MegolmDecryption extends DecryptionAlgorithm { olmlib.encryptMessageForDevice( encryptedContent.ciphertext, this.userId, - this.deviceId, + undefined, this.olmDevice, userId, deviceInfo, diff --git a/src/crypto/olmlib.ts b/src/crypto/olmlib.ts index f7ed067ee..7a5e3a26c 100644 --- a/src/crypto/olmlib.ts +++ b/src/crypto/olmlib.ts @@ -97,6 +97,7 @@ export async function encryptMessageForDevice( const payload = { sender: ourUserId, + // TODO this appears to no longer be used whatsoever sender_device: ourDeviceId, // Include the Ed25519 key so that the recipient knows what