In sent message details, "last heard" timestamp of self-added contact shows spurious large number without unit. #247

Closed
opened 2026-10-27 15:45:44 +01:00 by adam · 3 comments
Owner

Describe the bug

There was an issue where a manually added contact where never an advert was received did show a large number without any unit in the "last heard"-field in the contacts list.

This has been fixed in v0.9.12 in the contacts list view, so that then N/A is shown.

But when I go in a chat and view a message detail, I still see that large number.
(What I actually did is added myself as a contact, so I see it at every message I sent.)

Photograph:


Image

Which device are you using

LilyGO T-Deck Plus

Which Firmware are you using

v0.9.12

To Reproduce

  1. Manually add your public key as contact,
  2. Send a message,
  3. Open the details of that sent message,
  4. See a Last heard: 20055 ago-timestamp (large number without any unit, so it is not known what that number actually means).

Expected result

Add a proper unit!, or use N/A.

And question: What unit would that 20055 actually have (even if N/A is better to display, I am courious and would like to know the answer, what time the device actually thinks is the "last heard" timestamp)?

Regards!

**Describe the bug** [There was an issue where a manually added contact where never an advert was received did show a large number without any unit in the "last heard"-field in the contacts list](https://github.com/dabeani/meshcoreterm/issues/140#issuecomment-4112251611). This has been [fixed in v0.9.12 in the contacts list view](https://github.com/dabeani/meshcoreterm/issues/140#issuecomment-4240022747), so that then `N/A` is shown. But when I go in a chat and view a message detail, I still see that large number. *(What I actually did is added myself as a contact, so I see it at every message I sent.)* Photograph: --- <img width="832" height="597" alt="Image" src="https://github.com/user-attachments/assets/c10cc37d-e467-456d-941c-96430021325f" /> --- **Which device are you using** LilyGO T-Deck Plus **Which Firmware are you using** v0.9.12 **To Reproduce** 1. Manually add your public key as contact, 2. Send a message, 3. Open the details of that sent message, 4. See a `Last heard: 20055 ago`-timestamp (large number without any unit, so it is not known what that number actually means). **Expected result** Add a proper unit!, or use `N/A`. And _question_: What unit would that `20055` actually have (even if `N/A` is better to display, I am courious and would like to know the answer, what time the device actually _thinks_ is the "last heard" timestamp)? Regards! <!-- github-sync-id:4375820624 -->
adam closed this issue 2026-10-27 15:45:44 +01:00
Author
Owner

Fixed (v0.9.12.1)

  • Message detail / Last heard: fix the "last heard" age label showing a large bare number without a unit (e.g. 20055 ago) in sent-message details for contacts whose lastmod was stored as a boot-uptime second (manually added with no RTC sync). The age_label buffer was only 6 bytes, so values like 20219d overflowed and the unit suffix was dropped by snprintf. Buffer grown to 10 bytes; unknown-age fall-through now leaves the display as Last heard: -- instead of the malformed Last heard: -- ago (#247).
### Fixed (v0.9.12.1) - Message detail / Last heard: fix the "last heard" age label showing a large bare number without a unit (e.g. `20055 ago`) in sent-message details for contacts whose `lastmod` was stored as a boot-uptime second (manually added with no RTC sync). The `age_label` buffer was only 6 bytes, so values like `20219d` overflowed and the unit suffix was dropped by `snprintf`. Buffer grown to 10 bytes; unknown-age fall-through now leaves the display as `Last heard: --` instead of the malformed `Last heard: -- ago` (#247). <!-- github-comment-id:4401544249 -->
Author
Owner

OK, now (v0.9.12.3) in the message detail the "last heard" value shows 20xxxd ago. Which is also -- hm -- incorrect, but it seems that it just uses 1970-02-08 11:16:04 as date of manually added contacts (which was displayed to me in the contacts details of a contact which I just have added manually).

Better use the timestamp of when the contact was added! Manually added == manually heard. OR: Don't use any time information at all.

OK, now (v0.9.12.3) in the message detail the "last heard" value shows `20xxxd ago`. Which is also -- hm -- incorrect, but it seems that it just uses 1970-02-08 11:16:04 as date of manually added contacts (which was displayed to me in the contacts details of a contact which I _just_ have added manually). Better use the timestamp of when the contact was added! Manually added == manually heard. OR: Don't use _any_ time information at all. <!-- github-comment-id:4604742302 -->
Author
Owner

With v0.9.14 it is fixed: Manually added contact shows timestamp of adding (i.e. a few seconds if I just added it).

BUT the release notes are wrong:

They say

Manually added contacts (including adding yourself) now correctly show Last heard: -- until they actually send something

but they show the timestamp of adding as "last heard" if they did not send something.

See #360 for the issue report of the wrong release note text.

With v0.9.14 it is fixed: Manually added contact shows timestamp of adding (i.e. a few seconds if I just added it). BUT the [release notes](https://github.com/dabeani/meshcoreterm/releases/tag/v0.9.14) are wrong: They say > *Manually added contacts (including adding yourself) now correctly show Last heard: -- until they actually send something* but they show the timestamp of adding as "last heard" if they did not send something. See #360 for the issue report of the wrong release note text. <!-- github-comment-id:6069917591 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/meshcore#247