Replace MatrixClient.isCryptoEnabled by MatrixClient.getCrypto (#140)

* Replace `MatrixClient.isCryptoEnabled` by `MatrixClient.getCrypto`

* Cast `cryptoEnabled` as `boolean`

* Fix `MatrixChat-test`

(cherry picked from commit 950ab1940bfcea9443f03284f9175d319c13a44c)
This commit is contained in:
Florian Duros
2024-10-16 09:42:18 +01:00
committed by Michael Telatynski
parent 146968da2c
commit 571ada37a7
14 changed files with 11 additions and 36 deletions
+1 -1
View File
@@ -1461,7 +1461,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
// set the state immediately then update, so we don't scare the user into thinking the room is unencrypted
this.setState({ e2eStatus });
if (this.context.client.isCryptoEnabled()) {
if (this.context.client.getCrypto()) {
/* At this point, the user has encryption on and cross-signing on */
e2eStatus = await shieldStatusForRoom(this.context.client, room);
RoomView.e2eStatusCache.set(room.roomId, e2eStatus);