profanity icon indicating copy to clipboard operation
profanity copied to clipboard

Wrong time stamps in messages (presumably) from MAM

Open mdosch opened this issue 2 years ago • 1 comments

When opening a MUC and receiving old messages (presumably from MAM) some messages showed the real time stamp, but some in between showed the current time stamp of the moment opening the chat.

_jLKZecbSUiictGeps-f3A

Expected Behavior

All messages should show the time stamp when the message was sent.

Current Behavior

Some messages show the time stamp from the moment the messages are received.

Steps to Reproduce (for bugs)

  1. Profanity is not connected
  2. Receive messages in a MUC you are participating in.
  3. Connect profanity.
  4. Compare time stamps of the fetched messages to the real time stamps (e.g. in another client).

Environment

  • Debian Testing (trixie)
profanity --version
Profanity, version 0.14.0dev.master.0e66cbe4
Copyright (C) 2012 - 2019 James Booth <[email protected]>.
Copyright (C) 2019 - 2023 Michael Vetter <[email protected]>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Disabled
PGP support: Enabled (libgpgme 1.18.0)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Disabled
GTK icons/clipboard: Disabled
GDK Pixbuf: Enabled

mdosch avatar Dec 07 '23 16:12 mdosch

Looking at chatlog.c I think this may be the issue if (timestamp == NULL) { timestamp = g_date_time_new_now_local(); } else { g_date_time_ref(timestamp); }

If the message has somehow lost its timestamp its just set to the local time so as not lack having a time stamp. Trying to work on it now, just not sure if this is the source of the issue since something is causing it to lose the timestamp.

OdenDillenkoffer avatar Feb 06 '25 22:02 OdenDillenkoffer