Skip to content

fix: Check m.room.encrypted permission for composer in encrypted rooms - #3092

Open
Yashh56 wants to merge 1 commit into
cinnyapp:devfrom
Yashh56:fix/E2EMessage
Open

fix: Check m.room.encrypted permission for composer in encrypted rooms#3092
Yashh56 wants to merge 1 commit into
cinnyapp:devfrom
Yashh56:fix/E2EMessage

Conversation

@Yashh56

@Yashh56 Yashh56 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes an issue where standard users were prevented from composing or sending messages in encrypted rooms if the power level required for m.room.message was elevated above their own (e.g. restricted to Admins).

When a room is encrypted, users send m.room.encrypted events instead of m.room.message events. Previously, the RoomView component unconditionally checked for m.room.message permission to determine if the message composer should be rendered. This PR updates the logic to evaluate the correct m.room.encrypted permission when E2EE is enabled.

Changes

  • Updated RoomView.tsx to determine the encryption state of the room using mx.isRoomEncrypted(roomId).
  • Conditionally verify the composer permission against MessageEvent.RoomMessageEncrypted (m.room.encrypted) instead of EventType.RoomMessage when the room is encrypted.

Close: #3027

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Preview: https://3092--cinny-pr.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Users cannot send messages in encrypted rooms when m.room.message is inaccessible via power levels

1 participant