Skip to content

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

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

bmc08gt merged 1 commit into
code/cashfrom
fix/dm-speaker-rules

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

The Flipcash welcome chat is a DM with a never speaker rule, and on code/cash it still shows the composer with "Send a Tip". ChatViewModel built the speaker block from ChatSubject.Group rules only and returned no block for a DM.

This reads speaker rules from the chat's metadata (observeMetadata, metadata.rules) for every chat type, so the welcome DM gets the "Only Flipcash can send messages" pill. A DM with no rules keeps its composer.

It also draws the design's fill (#1E1E1E at 46%) over the Haze blur in SpeakerGateBar (node 10588:1969), matching the iOS tint. The corner radius stays at 12dp.

Both changes were meant for #1631 but were pushed after it merged; this is the same commit (e8b561b3d) cherry-picked onto code/cash.

New ChatViewModelStateTest cases: a DM with never is read-only, and a DM with no rules keeps the composer.

The speaker rules were read from the group subject only, and DMs were
treated as unrestricted. The Flipcash welcome chat is a DM that carries a
never rule in its metadata, so its composer stayed and the send button
showed "Send a Tip". Another session found the DM gap.

Rules now come from observeMetadata for any chat; a DM without rules is
still unblocked. The never pill also draws the design's 0x1E1E1E fill at
0.46 alpha over the blur.
@bmc08gt bmc08gt self-assigned this Sep 30, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Sep 30, 2026
@bmc08gt
bmc08gt merged commit 17bfb34 into code/cash Sep 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant