mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Show nick for title
This commit is contained in:
parent
0c1bbb63c0
commit
eef7f9cfd4
@ -238,8 +238,14 @@ win_get_title(ProfWin *window)
|
||||
if (window->type == WIN_CHAT) {
|
||||
ProfChatWin *chatwin = (ProfChatWin*) window;
|
||||
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
||||
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;
|
||||
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
|
||||
|
Loading…
Reference in New Issue
Block a user