From bc475bc75e8c962a87d323d65f6e87a973491f97 Mon Sep 17 00:00:00 2001 From: DeFiDude <59237470+DeFiDude@users.noreply.github.com> Date: Sun, 5 Apr 2026 19:45:11 -0600 Subject: [PATCH] Use local receive time for incoming message timestamps --- src/reticulum/LXMFManager.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/reticulum/LXMFManager.cpp b/src/reticulum/LXMFManager.cpp index 1b4b062..10692b4 100644 --- a/src/reticulum/LXMFManager.cpp +++ b/src/reticulum/LXMFManager.cpp @@ -314,10 +314,14 @@ void LXMFManager::processIncoming(const uint8_t* data, size_t len, const RNS::By if (destHash.size() > 0) { msg.destHash = destHash; } - // Stamp with receiver's local time if sender's timestamp is missing/invalid - if (msg.timestamp < 1700000000) { + // Use local receive time for incoming messages so all timestamps in + // the conversation reflect THIS device's clock, not the sender's. + // Prevents confusing display when a peer's clock is wrong/unsynced. + { time_t now = time(nullptr); - if (now > 1700000000) msg.timestamp = (double)now; + if (now > 1700000000) { + msg.timestamp = (double)now; + } } Serial.printf("[LXMF] Message from %s (%d bytes) content_len=%d\n", msg.sourceHash.toHex().substr(0, 8).c_str(), (int)len, (int)msg.content.size());