diff --git a/spec/integ/matrix-client-crypto.spec.js b/spec/integ/matrix-client-crypto.spec.js index 284ff2ab2..d74009177 100644 --- a/spec/integ/matrix-client-crypto.spec.js +++ b/spec/integ/matrix-client-crypto.spec.js @@ -203,7 +203,7 @@ function aliSendsFirstMessage() { expectAliQueryKeys() .then(expectAliClaimKeys) .then(expectAliSendMessageRequest), - ]).spread(function(_, ciphertext) { + ]).then(function([_, ciphertext]) { return ciphertext; }); } @@ -218,7 +218,7 @@ function aliSendsMessage() { return Promise.all([ sendMessage(aliTestClient.client), expectAliSendMessageRequest(), - ]).spread(function(_, ciphertext) { + ]).then(function([_, ciphertext]) { return ciphertext; }); } @@ -234,7 +234,7 @@ function bobSendsReplyMessage() { sendMessage(bobTestClient.client), expectBobQueryKeys() .then(expectBobSendMessageRequest), - ]).spread(function(_, ciphertext) { + ]).then(function([_, ciphertext]) { return ciphertext; }); } @@ -492,7 +492,7 @@ describe("MatrixClient crypto", function() { aliTestClient.client.getStoredDevicesForUser(bobUserId), aliTestClient.client.getStoredDevicesForUser(eveUserId), ]); - }).spread((bobDevices, eveDevices) => { + }).then(([bobDevices, eveDevices]) => { // should get an empty list expect(bobDevices).toEqual([]); expect(eveDevices).toEqual([]); diff --git a/src/crypto/algorithms/olm.js b/src/crypto/algorithms/olm.js index f233e8f9f..93d651d49 100644 --- a/src/crypto/algorithms/olm.js +++ b/src/crypto/algorithms/olm.js @@ -139,7 +139,7 @@ OlmEncryption.prototype.encryptMessage = async function(room, eventType, content } } - return await Promise.all(promises).return(encryptedContent); + return await Promise.all(promises).then(() => encryptedContent); }; /**