mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-19 23:16:21 +00:00
Use correct MUC message timestamp
win_println_incoming_muc_msg() always used the current time. Now let's use whatever is sent int he message struct (from the delay stanza or the current time that we set now once the message is received). No playing with the time upon display anymore.
This commit is contained in:
@@ -1152,19 +1152,15 @@ win_print_them(ProfWin *window, theme_item_t theme_item, const char *const show_
|
||||
void
|
||||
win_println_incoming_muc_msg(ProfWin *window, char *show_char, int flags, const ProfMessage *const message)
|
||||
{
|
||||
//TODO: we always use current timestamp here. instead of the message->timestamp one if available. i think somewhere else we check whether it exists first.
|
||||
GDateTime *timestamp = g_date_time_new_now_local();
|
||||
|
||||
if (prefs_get_boolean(PREF_CORRECTION_ALLOW) && message->replace_id) {
|
||||
_win_correct(window, message->plain, message->id, message->replace_id);
|
||||
} else {
|
||||
_win_printf(window, show_char, 0, timestamp, flags | NO_ME, THEME_TEXT_THEM, message->jid->resourcepart, message->id, "%s", message->plain);
|
||||
_win_printf(window, show_char, 0, message->timestamp, flags | NO_ME, THEME_TEXT_THEM, message->jid->resourcepart, message->id, "%s", message->plain);
|
||||
}
|
||||
// buffer_append(window->layout->buffer, show_char, 0, timestamp, flags | NO_ME, THEME_TEXT_THEM, them, message, NULL, NULL);
|
||||
// _win_print_internal(window, show_char, 0, timestamp, flags | NO_ME, THEME_TEXT_THEM, them, message, NULL);
|
||||
|
||||
inp_nonblocking(TRUE);
|
||||
g_date_time_unref(timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user