mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
win_print_history() print 'me' on regular chats if we wrote the message
Same behaviour like when we used to get it from the text files.
This commit is contained in:
parent
067bc690f2
commit
bd116e6ad9
@ -1234,9 +1234,17 @@ win_print_history(ProfWin *window, const ProfMessage *const message, gboolean is
|
||||
flags = NO_COLOUR_FROM;
|
||||
}
|
||||
g_free(muc_history_color);
|
||||
} else {
|
||||
const char *jid = connection_get_fulljid();
|
||||
Jid *jidp = jid_create(jid);
|
||||
|
||||
if (g_strcmp0(jidp->barejid, message->jid->barejid) == 0) {
|
||||
display_name = strdup("me");
|
||||
} else {
|
||||
display_name = roster_get_msg_display_name(message->jid->barejid, message->jid->resourcepart);
|
||||
}
|
||||
jid_destroy(jidp);
|
||||
}
|
||||
|
||||
buffer_append(window->layout->buffer, "-", 0, message->timestamp, flags, THEME_TEXT_HISTORY, display_name, NULL, message->plain, NULL, NULL);
|
||||
_win_print_internal(window, "-", 0, message->timestamp, flags, THEME_TEXT_HISTORY, display_name, message->plain, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user