feat(chat): raise the composer cap to the tier-2 larger-message capacity

The composer byte cap was 236 (one memo). With larger-messages tier 2 a body
can span up to 16 memo outputs in one tx, so kChatBodyMaxBytes rises to 4000
(a touch under the ~4063 protocol max so the composer never produces a body
compose would reject). The compose buffer grows to match, guarded by a
static_assert, and the emoji picker / byte gauge follow the single constant.
sendChatMessage now shows a specific "message too long" toast on a TooLong
compose instead of the generic compose-failed one (English string added; the
8 locales fall back until translated).

Broadcast is unchanged — both chatSendOutputs call sites already iterate the
N outputs. (Lite backend acceptance of >2 duplicate-address 0-value outputs is
the one bit needing a live smoke test, like the other lite broadcast paths.)

Larger-messages tiers 1-2 are now usable end to end on the full node.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 11:19:45 -05:00
co-authored by Claude Opus 4.8
parent 6b93a8ab60
commit 743e7f8b65
3 changed files with 13 additions and 7 deletions
+5 -3
View File
@@ -4660,9 +4660,11 @@ void App::sendChatMessage(const std::string& conversationId, const std::string&
}
chat::OutgoingChatMemos memos;
if (chat_service_.composeMessage(myReply, peerPubKey, peerZaddr, conversationId, text, memos)
!= chat::ChatComposeStatus::Ok) {
ui::Notifications::instance().error(TR("chat_toast_compose_failed"));
const auto composeStatus =
chat_service_.composeMessage(myReply, peerPubKey, peerZaddr, conversationId, text, memos);
if (composeStatus != chat::ChatComposeStatus::Ok) {
ui::Notifications::instance().error(TR(composeStatus == chat::ChatComposeStatus::TooLong
? "chat_toast_too_long" : "chat_toast_compose_failed"));
return;
}
chat::ChatMessage echo;