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
Catch exceptions from backupGroupSession()
This commit is contained in:
@@ -269,7 +269,11 @@ MegolmEncryption.prototype._prepareNewSession = async function() {
|
|||||||
this._crypto.backupGroupSession(
|
this._crypto.backupGroupSession(
|
||||||
this._roomId, this._olmDevice.deviceCurve25519Key, [],
|
this._roomId, this._olmDevice.deviceCurve25519Key, [],
|
||||||
sessionId, key.key,
|
sessionId, key.key,
|
||||||
);
|
).catch((e) => {
|
||||||
|
// This throws if the upload failed, but this is fine
|
||||||
|
// since it will have written it to the db and will retry.
|
||||||
|
console.log("Failed to back up group session", e);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return new OutboundSessionInfo(sessionId);
|
return new OutboundSessionInfo(sessionId);
|
||||||
@@ -855,7 +859,11 @@ MegolmDecryption.prototype.onRoomKeyEvent = function(event) {
|
|||||||
content.room_id, senderKey, forwardingKeyChain,
|
content.room_id, senderKey, forwardingKeyChain,
|
||||||
content.session_id, content.session_key, keysClaimed,
|
content.session_id, content.session_key, keysClaimed,
|
||||||
exportFormat,
|
exportFormat,
|
||||||
);
|
).catch((e) => {
|
||||||
|
// This throws if the upload failed, but this is fine
|
||||||
|
// since it will have written it to the db and will retry.
|
||||||
|
console.log("Failed to back up group session", e);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
logger.error(`Error handling m.room_key_event: ${e}`);
|
logger.error(`Error handling m.room_key_event: ${e}`);
|
||||||
@@ -984,7 +992,11 @@ MegolmDecryption.prototype.importRoomKey = function(session) {
|
|||||||
session.session_key,
|
session.session_key,
|
||||||
session.sender_claimed_keys,
|
session.sender_claimed_keys,
|
||||||
true,
|
true,
|
||||||
);
|
).catch((e) => {
|
||||||
|
// This throws if the upload failed, but this is fine
|
||||||
|
// since it will have written it to the db and will retry.
|
||||||
|
console.log("Failed to back up group session", e);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// have another go at decrypting events sent with this session.
|
// have another go at decrypting events sent with this session.
|
||||||
this._retryDecryption(session.sender_key, session.session_id);
|
this._retryDecryption(session.sender_key, session.session_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user