Mercurial > pidgin.yaz
changeset 23736:8ba3d6905252
When opening MSN chats, use "Local alias" in preference to "Display
name" in preference to "Username" for ourselves.
Fixes #4891.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 08 Aug 2008 05:49:47 +0000 |
parents | 331effbd1cc8 |
children | e8f75e750260 |
files | libpurple/protocols/msn/msn.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c Fri Aug 08 04:47:50 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Fri Aug 08 05:49:47 2008 +0000 @@ -514,6 +514,8 @@ MsnSession *session; MsnSwitchBoard *swboard; + const char *alias; + g_return_if_fail(PURPLE_BLIST_NODE_IS_BUDDY(node)); buddy = (PurpleBuddy *) node; @@ -530,8 +532,13 @@ swboard->conv = serv_got_joined_chat(gc, swboard->chat_id, "MSN Chat"); swboard->flag = MSN_SB_FLAG_IM; + /* Local alias > Display name > Username */ + if ((alias = purple_account_get_alias(buddy->account)) == NULL) + if ((alias = purple_connection_get_display_name(gc)) == NULL) + alias = purple_account_get_username(buddy->account); + purple_conv_chat_add_user(PURPLE_CONV_CHAT(swboard->conv), - purple_account_get_username(buddy->account), NULL, PURPLE_CBFLAGS_NONE, TRUE); + alias, NULL, PURPLE_CBFLAGS_NONE, TRUE); } static void