/pidgin/main: 50884c0b222a: Check that we actually don't have op...

Mat?j Cepl mcepl at cepl.eu
Fri Jun 5 13:10:10 EDT 2015


Changeset: 50884c0b222a7f31782ee05fcc21e7df74378d08
Author:	 Mat?j Cepl <mcepl at cepl.eu>
Date:	 2015-06-05 12:57 -0400
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/50884c0b222a

Description:

Check that we actually don't have opened a tab with conversation we want to open.

diffstat:

 libpurple/server.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff --git a/libpurple/server.c b/libpurple/server.c
--- a/libpurple/server.c
+++ b/libpurple/server.c
@@ -765,7 +765,10 @@ PurpleChatConversation *purple_serv_got_
 	g_return_val_if_fail(account != NULL, NULL);
 	g_return_val_if_fail(name != NULL, NULL);
 
-	chat = purple_chat_conversation_new(account, name);
+	chat = purple_conversations_find_chat_with_account(name, account);
+	if (!chat) {
+	    chat = purple_chat_conversation_new(account, name);
+	}
 	g_return_val_if_fail(chat != NULL, NULL);
 
 	if (!g_slist_find(purple_connection_get_active_chats(gc), chat))



More information about the Commits mailing list