Repository navigation
Held Bot Social sends are never invisible: sender Bot's chat shows the card, wait dot and why (part of #371) - #372
Merged
Merged
Conversation
…e card and wait dot when the friend's chat is hidden, with why it was held (part of #371)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Part of #371 (also touches Birfy/bot-social#13's symptom; the Bot Social regex fix is Birfy/bot-social#14).
Problem
A Bot Social hold on a local Bot's outgoing message was shown only in the chat of the friend's Bot it is addressed to. When that chat is hidden, gone, home-level or absent, nobody could see or decide it, and the sender's chat looked as if it had sent.
Change
approvalViewkeeps the Bot Social identity that wrote the hold (botId) and the hold's reasons (holdReasons: only DLP category names, e.g.commitment,pii.phone; never server text).pendingApprovalsmaps the identity to the local Bot (fromId).approvalsForOpenChat: the sender Bot's chat shows the card unless a listed friend chat exists (listedFriendChat: in the roster, not hidden/gone/home-level). A listed friend chat still shows it alone (Approvals: stale 'waiting for the owner' line in Face-to-face rooms; one place per approval; pointer vs open chat #278).Held for your approval: contains commitment language(en / 中文 via the host translator; the slot now passesttoflybot.session.dock). The held text stays on the card; the bubble only says it waits (earlier decision).chatApprovalsprovider answers for local Bots (fromId), andchannel.jsno longer limitspendingCountto remote chats.Decision to check
I did not post a "held" message into the sender's chat: no host API does it for a local Bot, and text written there is read by the Bot's model. The card in that chat carries the note instead. Say if you want a real chat bubble (needs a host API).
Tests
Fail without the change: social (
status (#371),#371: a local Bot's hold shows in its own chat…for hidden / gone / absent / home-level / listed, en + zh) and core (channel: a local Bot gets pendingCount…).ARCH_DOCS_BASE=origin/main TZ=UTC npm run verifygreen.T3 (
plugins/social/src/social.js): needs an independent PASS and your approval; not merged. No deploy.