fix(chat): apply speaker rules to DMs so the welcome chat is read-only - #1638
Merged
Merged
Conversation
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.
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Flipcash welcome chat is a DM with a
neverspeaker rule, and oncode/cashit still shows the composer with "Send a Tip".ChatViewModelbuilt the speaker block fromChatSubject.Grouprules 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 (
#1E1E1Eat 46%) over the Haze blur inSpeakerGateBar(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 ontocode/cash.New
ChatViewModelStateTestcases: a DM withneveris read-only, and a DM with no rules keeps the composer.