diff options
author | David Woodhouse <dwmw2@infradead.org> | 2018-03-22 22:30:28 +0000 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2018-03-22 22:30:28 +0000 |
commit | 4d2c11c432f2c54df976f0384a05f59223a5595a (patch) | |
tree | 45d44dd439a97b60cbda3eae588532afe7d67dfd | |
parent | d534bc75eae460ea7acbbaaf2cfcbb650f403d6b (diff) | |
download | pidgin-4d2c11c432f2c54df976f0384a05f59223a5595a.tar.gz |
Pidgin: use alias from existing PurpleConvChatBuddy, don't make one up
Since the PRPL can provide aliases and libpurple passes them on, there's
no good reason why Pidgin should be ignoring that and trying to make them
up for itself.
Fixes #17295
-rw-r--r-- | pidgin/gtkconv.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c index 74dbe69618..10eaf82815 100644 --- a/pidgin/gtkconv.c +++ b/pidgin/gtkconv.c @@ -4419,13 +4419,16 @@ update_chat_alias(PurpleBuddy *buddy, PurpleConversation *conv, PurpleConnection const char *alias = name; char *tmp; char *alias_key = NULL; - PurpleBuddy *buddy2; if (!purple_strequal(chat->nick, purple_normalize(conv->account, name))) { /* This user is not me, so look into updating the alias. */ - - if ((buddy2 = purple_find_buddy(conv->account, name)) != NULL) { - alias = purple_buddy_get_contact_alias(buddy2); + GList *users = purple_conv_chat_get_users(PURPLE_CONV_CHAT(conv)); + for (; users; users = users->next) { + PurpleConvChatBuddy *cb = users->data; + if (purple_strequal(name, cb->name)) { + alias = cb->alias; + break; + } } tmp = g_utf8_casefold(alias, -1); |