You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Stop using bluebird .returns and .spread
This commit is contained in:
@@ -203,7 +203,7 @@ function aliSendsFirstMessage() {
|
|||||||
expectAliQueryKeys()
|
expectAliQueryKeys()
|
||||||
.then(expectAliClaimKeys)
|
.then(expectAliClaimKeys)
|
||||||
.then(expectAliSendMessageRequest),
|
.then(expectAliSendMessageRequest),
|
||||||
]).spread(function(_, ciphertext) {
|
]).then(function([_, ciphertext]) {
|
||||||
return ciphertext;
|
return ciphertext;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -218,7 +218,7 @@ function aliSendsMessage() {
|
|||||||
return Promise.all([
|
return Promise.all([
|
||||||
sendMessage(aliTestClient.client),
|
sendMessage(aliTestClient.client),
|
||||||
expectAliSendMessageRequest(),
|
expectAliSendMessageRequest(),
|
||||||
]).spread(function(_, ciphertext) {
|
]).then(function([_, ciphertext]) {
|
||||||
return ciphertext;
|
return ciphertext;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -234,7 +234,7 @@ function bobSendsReplyMessage() {
|
|||||||
sendMessage(bobTestClient.client),
|
sendMessage(bobTestClient.client),
|
||||||
expectBobQueryKeys()
|
expectBobQueryKeys()
|
||||||
.then(expectBobSendMessageRequest),
|
.then(expectBobSendMessageRequest),
|
||||||
]).spread(function(_, ciphertext) {
|
]).then(function([_, ciphertext]) {
|
||||||
return ciphertext;
|
return ciphertext;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -492,7 +492,7 @@ describe("MatrixClient crypto", function() {
|
|||||||
aliTestClient.client.getStoredDevicesForUser(bobUserId),
|
aliTestClient.client.getStoredDevicesForUser(bobUserId),
|
||||||
aliTestClient.client.getStoredDevicesForUser(eveUserId),
|
aliTestClient.client.getStoredDevicesForUser(eveUserId),
|
||||||
]);
|
]);
|
||||||
}).spread((bobDevices, eveDevices) => {
|
}).then(([bobDevices, eveDevices]) => {
|
||||||
// should get an empty list
|
// should get an empty list
|
||||||
expect(bobDevices).toEqual([]);
|
expect(bobDevices).toEqual([]);
|
||||||
expect(eveDevices).toEqual([]);
|
expect(eveDevices).toEqual([]);
|
||||||
|
|||||||
@@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user