Skip to content

fix(chat): apply speaker rules to DMs so the Flipcash chat is read-only - #929

Merged
bmc08gt merged 1 commit into
mainfrom
fix/dm-speaker-rules
Sep 30, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
fix/dm-speaker-rules

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

The Flipcash welcome chat still showed the composer. It is a tip DM (type 2) with the flipcash account, and its metadata carries a never speaker rule. ConversationScreen only evaluated rules when type == .group, so every DM got .open.

gate and gateVerdicts now read the rules of whatever chat is on screen. A DM participant is always a member (ConversationStore.isMember), so a never rule resolves to readOnly(.never) and draws the "Only Flipcash can send messages" pill. A DM without rules stays open.

Reply and reactions already applied rules to every chat type through ConversationController.gateConversation. Only the composer was missing.

The contract still documents Metadata.rules as "Only supported for group chats", which is how the group-only check got in.

Android fixed the same gap in code-payments/code-android-app#1638.

The Flipcash welcome chat is a tip DM that carries a never speaker rule in its
metadata, but ConversationScreen only evaluated rules for groups, so a DM always
got the ordinary composer. gate and gateVerdicts now read the rules of any chat
on screen. A DM participant is always a member, so a never rule resolves to
readOnly(.never) and draws the "Only Flipcash can send messages" pill. A DM
without rules stays open.

Reply and reactions were already gated for every chat type through
ConversationController.gateConversation; only the composer was missing.
Mirrors code-android-app#1638.
@bmc08gt bmc08gt self-assigned this Sep 30, 2026
@bmc08gt
bmc08gt merged commit 3d0aea2 into main Sep 30, 2026
1 check failed
@bmc08gt
bmc08gt deleted the fix/dm-speaker-rules branch October 5, 2026 15:13
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.

1 participant