Skip to content

Fix/nonmember message actions - #1541

Merged
bmc08gt merged 2 commits into
code/cashfrom
fix/nonmember-message-actions
Sep 23, 2026
Merged

bmc08gt merged 2 commits into
code/cashfrom
fix/nonmember-message-actions

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

A viewer outside a group who meets its balance rule saw the same blurred
transcript as one who didn't, because isGatedPreview answered both "blur
the transcript" and "replace the composer". It is now two flags, named
after iOS's ConversationGatePresentation: obscuresTranscript and
replacesComposer.

The blur comes off only when the viewer is a known non-member, the access
is Eligible, and the group has listener rules. messaging.v1.ViewMode only
serves a non-member the full transcript when they satisfy a listener rule;
a group with no listener rules also computes Eligible but has nothing to
serve. A null access or null membership keeps the blur, so the transcript
fades in after the balance arrives rather than showing and then blurring.
A balance that drops re-emits Blocked and the blur returns.

openTranscript skips groups the viewer is outside of, and the group feed
only carries joined groups, so nothing loaded an eligible viewer's
messages. They are now fetched when readsFromOutside turns true, keyed on
the chat so a dip and recovery refetches.

Two guards follow from showing messages to a non-member: the read pointer
is not advanced for someone outside the group, since the server refuses
it, and OnGroupResolved clears groupAccess when membership or rules
change, so a stale Eligible cannot unblur a group whose rules tightened.

A succeeded join no longer holds the blur. The only viewer who can join
is already reading the transcript sharp. It still holds the composer back
through the checkmark.
With #1537 an eligible non-member reads a group's transcript under the
Join gate, but resolveCapabilities looks only at the message, so every
other person's message offered Reply. Swiping or picking Reply set
replyingTo behind the gate, and the composer later opened quoting it once
the viewer joined. A former member's own messages offered Edit and Delete
the same way.

resolveCapabilities takes canPost, and a viewer who cannot post keeps
only Copy and Report. The transcript mapping re-runs when the viewer
joins or leaves, and the selection bar narrows its set with readOnly() if
they left after the row was mapped, as it already does with the edit and
delete windows.
@bmc08gt
bmc08gt merged commit dfe079a into code/cash Sep 23, 2026
4 of 5 checks passed
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