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:
parent
146968da2c
commit
571ada37a7
14 changed files with 11 additions and 36 deletions
|
@ -265,7 +265,7 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
|||
public constructor(props: ISendMessageComposerProps, context: React.ContextType<typeof RoomContext>) {
|
||||
super(props, context);
|
||||
|
||||
if (this.props.mxClient.isCryptoEnabled() && this.props.mxClient.isRoomEncrypted(this.props.room.roomId)) {
|
||||
if (this.props.mxClient.getCrypto() && this.props.mxClient.isRoomEncrypted(this.props.room.roomId)) {
|
||||
this.prepareToEncrypt = throttle(
|
||||
() => {
|
||||
this.props.mxClient.getCrypto()?.prepareToEncrypt(this.props.room);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue