mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-03 18:56:15 +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:
co-authored by
Claude Sonnet 4.6
parent
6a394e2d7a
commit
7a5247d5d4
@@ -65,7 +65,7 @@ public:
|
||||
virtual void msgRead(int msgcount) = 0;
|
||||
virtual void newMsg(uint8_t path_len, const char* from_name, const char* text, int msgcount, uint8_t contact_type = 0, const uint8_t* pub_key = nullptr) = 0;
|
||||
virtual void notify(UIEventType t = UIEventType::none) = 0;
|
||||
virtual void addChannelMsg(uint8_t channel_idx, const char* text) {}
|
||||
virtual void addChannelMsg(uint8_t channel_idx, const char* text, uint32_t timestamp = 0) {}
|
||||
virtual void addDMMsg(const uint8_t* pub_key, bool outgoing, const char* text, uint32_t sender_timestamp = 0) {}
|
||||
// A node shared its current position via a [LOC] message. pub_key is the
|
||||
// sender's key prefix for a verified DM share, or null for a channel share
|
||||
|
||||
Reference in New Issue
Block a user