1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Show nick for title

This commit is contained in:
James Booth 2014-12-21 22:39:00 +00:00
parent 0c1bbb63c0
commit eef7f9cfd4

View File

@ -238,7 +238,13 @@ win_get_title(ProfWin *window)
if (window->type == WIN_CHAT) {
ProfChatWin *chatwin = (ProfChatWin*) window;
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
return strdup(chatwin->barejid);
PContact contact = roster_get_contact(chatwin->barejid);
if (contact) {
const char *name = p_contact_name_or_jid(contact);
return strdup(name);
} else {
return strdup(chatwin->barejid);
}
}
if (window->type == WIN_MUC) {
ProfMucWin *mucwin = (ProfMucWin*) window;