Replace MatrixClient.prepareToEncrypt by MatrixClient.getCrypto.prepareToEncrypt (#146)
This commit is contained in:
@@ -367,7 +367,7 @@ export default class LegacyCallHandler extends EventEmitter {
|
||||
// the mapped one: that's where we'll send the events.
|
||||
const cli = MatrixClientPeg.safeGet();
|
||||
const room = cli.getRoom(call.roomId);
|
||||
if (room) cli.prepareToEncrypt(room);
|
||||
if (room) cli.getCrypto()?.prepareToEncrypt(room);
|
||||
};
|
||||
|
||||
public getCallById(callId: string): MatrixCall | null {
|
||||
|
||||
@@ -268,7 +268,7 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
||||
if (this.props.mxClient.isCryptoEnabled() && this.props.mxClient.isRoomEncrypted(this.props.room.roomId)) {
|
||||
this.prepareToEncrypt = throttle(
|
||||
() => {
|
||||
this.props.mxClient.prepareToEncrypt(this.props.room);
|
||||
this.props.mxClient.getCrypto()?.prepareToEncrypt(this.props.room);
|
||||
},
|
||||
60000,
|
||||
{ leading: true, trailing: false },
|
||||
|
||||
Reference in New Issue
Block a user