1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Add function to cancel and resend key request (#624)

This commit is contained in:
Luke Barnard
2018-03-08 15:01:01 +00:00
committed by GitHub
parent 0eb72122ce
commit 68b230a78f
4 changed files with 92 additions and 21 deletions

View File

@@ -623,6 +623,16 @@ MatrixClient.prototype.isEventSenderVerified = async function(event) {
return device.isVerified();
};
/**
* Cancel a room key request for this event if one is ongoing and resend the
* request.
* @param {MatrxEvent} event event of which to cancel and resend the room
* key request.
*/
MatrixClient.prototype.cancelAndResendEventRoomKeyRequest = function(event) {
event.cancelAndResendKeyRequest(this._crypto);
};
/**
* Enable end-to-end encryption for a room.
* @param {string} roomId The room ID to enable encryption in.