1
0
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:
Richard van der Hoff
2017-08-10 15:01:56 +01:00
parent cfd61096d9
commit 337c9cbea3
2 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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) {