Skip to content

Commit 8f6717c

Browse files
committed
I swear if this is still wrong, the keyboard won't survive
Signed-off-by: Šimon Brandner <[email protected]>
1 parent 0bec069 commit 8f6717c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/models/room.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -2202,9 +2202,8 @@ export class Room extends EventEmitter {
22022202
if (this.getMyMembership() !== "join") return false;
22032203

22042204
if (this.client.isRoomEncrypted(this.roomId)) {
2205-
return this.client.crypto
2206-
? this.currentState.maySendEvent(EventType.RoomMessageEncrypted, this.myUserId)
2207-
: this.client.usingExternalCrypto;
2205+
return (this.client.crypto || this.client.usingExternalCrypto) &&
2206+
this.currentState.maySendEvent(EventType.RoomMessageEncrypted, this.myUserId);
22082207
} else {
22092208
return this.currentState.maySendEvent(EventType.RoomMessage, this.myUserId);
22102209
}

0 commit comments

Comments
 (0)