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,7 +238,13 @@ win_get_title(ProfWin *window)
|
|||||||
if (window->type == WIN_CHAT) {
|
if (window->type == WIN_CHAT) {
|
||||||
ProfChatWin *chatwin = (ProfChatWin*) window;
|
ProfChatWin *chatwin = (ProfChatWin*) window;
|
||||||
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
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) {
|
if (window->type == WIN_MUC) {
|
||||||
ProfMucWin *mucwin = (ProfMucWin*) window;
|
ProfMucWin *mucwin = (ProfMucWin*) window;
|
||||||
|
Loading…
Reference in New Issue
Block a user