feat(chat): broadcast self-addressed Control memos (App::sendChatControl)

Adds App::sendChatControl(cid, op, label): composes a self-addressed Control
memo and hands it to the existing chat send coordinator (enqueueChatSend →
pump → the 0-value kChatMinFeeDrgx z_sendmany / lite send) exactly as a message
does — no new fund-path semantics. It carries no UI echo bubble (empty
echoLocalId; resolveOutgoing("") is a no-op), and the memo harvested back to us
is routed to the reducer, never shown as a message.

Phase A, step 4 (broadcast) of on-chain chat delete/restore. UI wiring next.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 00:26:59 -05:00
co-authored by Claude Opus 4.8
parent f56c94bc91
commit 5aa5fa7594
2 changed files with 33 additions and 0 deletions
+4
View File
@@ -321,6 +321,10 @@ public:
// Send a contact request into an existing conversation (used to retry a failed request in place).
void sendContactRequestForCid(const std::string& cid, const std::string& peerZaddr,
const std::string& text);
// Broadcast a self-addressed Control memo (op "del"/"res") so every device and a fresh seed import
// hides/restores this conversation. `label` is a plaintext hint (peer address/name) carried on-chain.
// Reuses the chat send coordinator + the 0-value kChatMinFeeDrgx z_sendmany path; no UI echo bubble.
void sendChatControl(const std::string& conversationId, const std::string& op, const std::string& label);
// Debug/sweep convenience: give the Chat tab a demo identity + a few sample conversations
// (in-memory only, not persisted) so the screenshot sweep captures the populated UI. No-op when
// the chat feature is off. Returns true when it had to fabricate the (random) demo identity