mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
fix(companion): show the sender's own timestamp for synced/queued messages
DM, room and channel history always stamped a message with receipt time (rtc_clock.getCurrentTime()), even though the sender's real timestamp was already available (and, for DMs/rooms, already threaded through to addDMMsg -- just never used for display). Live-received messages hid this because receipt lags origination by only seconds, but a room-sync replay or an offline-queued message held by a repeater can arrive long after it was sent, so a burst of backlog messages all showed as "just now". storeDMMsg() now prefers msg_ts (falling back to receipt time only when unknown). addChannelMsg() gained a timestamp parameter, threaded from onChannelMessageRecv() down through AbstractUITask/UITask, with the same fallback. The DM dedup check and outgoing-message timestamps are unaffected (they use msg_ts directly, already correct). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -721,7 +721,7 @@ void MyMesh::onChannelMessageRecv(const mesh::GroupChannel &channel, mesh::Packe
|
||||
_serial->writeFrame(frame, 1);
|
||||
}
|
||||
#ifdef DISPLAY_CLASS
|
||||
if (_ui) _ui->addChannelMsg(channel_idx, text);
|
||||
if (_ui) _ui->addChannelMsg(channel_idx, text, timestamp);
|
||||
if (_ui) _ui->notify(UIEventType::channelMessage);
|
||||
const char *channel_name = "Unknown";
|
||||
ChannelDetails channel_details;
|
||||
|
||||
Reference in New Issue
Block a user