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
Send a cancellation for room key requests (#456)
* Send a cancellation for room key requests When we receive a room key, cancel any pending requests we have open for that key.
This commit is contained in:
committed by
GitHub
parent
de257b34c0
commit
0371265fea
@@ -658,6 +658,14 @@ MegolmDecryption.prototype.onRoomKeyEvent = function(event) {
|
||||
content.session_key, event.getKeysClaimed(),
|
||||
);
|
||||
|
||||
// cancel any outstanding room key requests for this session
|
||||
this._crypto.cancelRoomKeyRequest({
|
||||
algorithm: content.algorithm,
|
||||
room_id: content.room_id,
|
||||
session_id: content.session_id,
|
||||
sender_key: senderKey,
|
||||
});
|
||||
|
||||
// have another go at decrypting events sent with this session.
|
||||
this._retryDecryption(senderKey, sessionId);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user