Use ProfMessage as parameter for win_println_incoming_muc_msg()

This commit is contained in:
Michael Vetter
2020-03-09 12:00:15 +01:00
parent 0801623018
commit 3d7e6fae7c
3 changed files with 6 additions and 7 deletions

View File

@@ -1150,15 +1150,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 char *const them, const char *const id, const char *const replace_id, const char *const message)
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) && replace_id) {
_win_correct(window, message, id, replace_id);
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, them, id, "%s", message);
_win_printf(window, show_char, 0, 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);
@@ -1187,7 +1187,6 @@ win_print_outgoing_muc_msg(ProfWin *window, char *show_char, const char *const m
void
win_print_outgoing(ProfWin *window, const char *show_char, const char *const id, const char *const replace_id, const char *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 (replace_id) {