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

Pass through function to discard megolm session

To make debugging crypto slightly faster
This commit is contained in:
David Baker
2018-08-29 18:06:45 +01:00
parent a6de395cde
commit 1b77ee0ef4
3 changed files with 43 additions and 0 deletions

View File

@@ -702,6 +702,21 @@ MatrixClient.prototype.isRoomEncrypted = function(roomId) {
return this._roomList.isRoomEncrypted(roomId);
};
/**
* Forces the current outbound group session to be discarded such
* that another one will be created next time an event is sent.
*
* @param roomId The ID of the room to discard the session for
*
* This should not normally be necessary.
*/
MatrixClient.prototype.forceDiscardSession = function(roomId) {
if (!this._crypto) {
throw new Error("End-to-End encryption disabled");
}
return this._crypto.forceDiscardSession(roomId);
};
/**
* Get a list containing all of the room keys
*