# HG changeset patch # User Ka-Hing Cheung # Date 1182405503 0 # Node ID e3a4ed0febd2439634e80c88286aef2f80220898 # Parent af7b944374baddd0ddb8746a74393bc54109c70c fix double clicking joined chat by asking the prpl what the real name of the chat is diff -r af7b944374ba -r e3a4ed0febd2 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Wed Jun 20 23:40:10 2007 +0000 +++ b/pidgin/gtkblist.c Thu Jun 21 05:58:23 2007 +0000 @@ -291,15 +291,30 @@ static void gtk_blist_join_chat(PurpleChat *chat) { PurpleConversation *conv; - - conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, - purple_chat_get_name(chat), + PurplePluginProtocolInfo *prpl_info; + const char *name; + char *chat_name; + + prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_find_prpl(purple_account_get_protocol_id(chat->account))); + + if (prpl_info && prpl_info->get_chat_name) + chat_name = prpl_info->get_chat_name(chat->components); + else + chat_name = NULL; + + if (chat_name) + name = chat_name; + else + name = purple_chat_get_name(chat); + + conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, name, chat->account); if (conv != NULL) purple_conversation_present(conv); serv_join_chat(chat->account->gc, chat->components); + g_free(chat_name); } static void gtk_blist_menu_join_cb(GtkWidget *w, PurpleChat *chat)