We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bec069 commit 8f6717cCopy full SHA for 8f6717c
src/models/room.ts
@@ -2202,9 +2202,8 @@ export class Room extends EventEmitter {
2202
if (this.getMyMembership() !== "join") return false;
2203
2204
if (this.client.isRoomEncrypted(this.roomId)) {
2205
- return this.client.crypto
2206
- ? this.currentState.maySendEvent(EventType.RoomMessageEncrypted, this.myUserId)
2207
- : this.client.usingExternalCrypto;
+ return (this.client.crypto || this.client.usingExternalCrypto) &&
+ this.currentState.maySendEvent(EventType.RoomMessageEncrypted, this.myUserId);
2208
} else {
2209
return this.currentState.maySendEvent(EventType.RoomMessage, this.myUserId);
2210
}
0 commit comments