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

Element-R: Add support for /discardsession (#3209)

Fixes https://github.com/vector-im/element-web/issues/24431
This commit is contained in:
Richard van der Hoff
2023-03-29 14:26:02 +01:00
committed by GitHub
parent f03293f53d
commit eb0c0f7b93
6 changed files with 86 additions and 10 deletions

View File

@@ -3130,13 +3130,14 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
*
* @param roomId - The ID of the room to discard the session for
*
* This should not normally be necessary.
* @deprecated Prefer {@link CryptoApi.forceDiscardSession | `CryptoApi.forceDiscardSession`}:
*
*/
public forceDiscardSession(roomId: string): void {
if (!this.crypto) {
if (!this.cryptoBackend) {
throw new Error("End-to-End encryption disabled");
}
this.crypto.forceDiscardSession(roomId);
this.cryptoBackend.forceDiscardSession(roomId);
}
/**