You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Make OlmDevice.decryptGroupMessage async
This commit is contained in:
@@ -797,11 +797,11 @@ OlmDevice.prototype.importInboundGroupSession = async function(data) {
|
|||||||
*
|
*
|
||||||
* @return {null} the sessionId is unknown
|
* @return {null} the sessionId is unknown
|
||||||
*
|
*
|
||||||
* @return {{result: string, senderKey: string,
|
* @return {Promise<{result: string, senderKey: string,
|
||||||
* forwardingCurve25519KeyChain: Array<string>,
|
* forwardingCurve25519KeyChain: Array<string>,
|
||||||
* keysClaimed: Object<string, string>}}
|
* keysClaimed: Object<string, string>}>}
|
||||||
*/
|
*/
|
||||||
OlmDevice.prototype.decryptGroupMessage = function(
|
OlmDevice.prototype.decryptGroupMessage = async function(
|
||||||
roomId, senderKey, sessionId, body,
|
roomId, senderKey, sessionId, body,
|
||||||
) {
|
) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|||||||
@@ -557,7 +557,7 @@ MegolmDecryption.prototype._decryptEvent = async function(event, requestKeysOnFa
|
|||||||
|
|
||||||
let res;
|
let res;
|
||||||
try {
|
try {
|
||||||
res = this._olmDevice.decryptGroupMessage(
|
res = await this._olmDevice.decryptGroupMessage(
|
||||||
event.getRoomId(), content.sender_key, content.session_id, content.ciphertext,
|
event.getRoomId(), content.sender_key, content.session_id, content.ciphertext,
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user