fix(bot): channel auto-replies now render as outgoing in history

tryBotReplyChannel() mirrored its own reply into the on-device history
prefixed with the node's own name instead of the "Me: " convention the
history view uses to tell an outgoing bubble from an incoming one, so
the bot's own reply rendered left-anchored like a message from someone
else labelled with the device's own name.
This commit is contained in:
Jakub
2026-08-31 22:04:55 +02:00
parent 1025d88045
commit 90bf5e5a11
2 changed files with 6 additions and 2 deletions
+5 -2
View File
@@ -200,8 +200,11 @@ void MyMesh::tryBotReplyChannel(uint8_t channel_idx, const char* text, uint8_t h
_bot_reply_count++;
#ifdef DISPLAY_CLASS
if (_ui) {
char with_sender[240]; // node_name(32) + ": "(2) + expanded(200) + margin
snprintf(with_sender, sizeof(with_sender), "%s: %s", _prefs.node_name, expanded);
// "Me: " (not node_name) -- MessagesScreen recognises an outgoing bubble
// by that literal prefix (see computeBubbleBox's caller), same framing
// MessagesScreen::afterSend and the app-originated-post mirror use.
char with_sender[240]; // "Me: "(4) + expanded(200) + margin
snprintf(with_sender, sizeof(with_sender), "Me: %s", expanded);
_ui->addChannelMsg(channel_idx, with_sender, 0, nullptr, 0, true); // own_message: our own bot reply, never unread
}
#endif