[gaim-migrate @ 6476]

Sat, 05 Jul 2003 07:16:22 +0000

author
Christian Hammond <chipx86@chipx86.com>
date
Sat, 05 Jul 2003 07:16:22 +0000
changeset 6026
b11d9f2fd725
parent 6025
b6a61196105d
child 6027
8572cc78fd07

[gaim-migrate @ 6476]
When a MSN user you're currently talking to in an IM window invites
somebody else into that (since IMs and chats are the same thing in MSN),
your IM window is closed and a chat window takes its place. Ugly, I hate
it, but it's better than having both open, and this will all become just
neato when the conversation API is rewritten to allow hybrid IM/Chat
windows.

src/protocols/msn/msn.c file | annotate | diff | comparison | revisions
src/protocols/msn/switchboard.c file | annotate | diff | comparison | revisions
--- a/src/protocols/msn/msn.c	Sat Jul 05 07:01:42 2003 +0000
+++ b/src/protocols/msn/msn.c	Sat Jul 05 07:16:22 2003 +0000
@@ -1101,10 +1101,10 @@
 	GaimAccount *account = gaim_connection_get_account(gc);
 	MsnSession *session = gc->proto_data;
 	MsnSwitchBoard *swboard;
-	
+
 	swboard = msn_session_find_switch_with_passport(session, who);
 
-	if (swboard != NULL) {
+	if (swboard != NULL && swboard->chat == NULL) {
 		char sendbuf[256];
 
 		g_snprintf(sendbuf, sizeof(sendbuf), "BYE %s\r\n",
--- a/src/protocols/msn/switchboard.c	Sat Jul 05 07:01:42 2003 +0000
+++ b/src/protocols/msn/switchboard.c	Sat Jul 05 07:16:22 2003 +0000
@@ -164,11 +164,17 @@
 
 	if (swboard->total_users > 1) {
 		if (swboard->chat == NULL) {
+			GaimConversation *conv;
+
+			conv = gaim_find_conversation(msn_user_get_passport(swboard->user));
+
 			swboard->chat = serv_got_joined_chat(gc, ++swboard->chat_id,
 												 "MSN Chat");
 
 			gaim_chat_add_user(GAIM_CHAT(swboard->chat),
 							   gaim_account_get_username(account), NULL);
+
+			gaim_conversation_destroy(conv);
 		}
 
 		gaim_chat_add_user(GAIM_CHAT(swboard->chat), params[3], NULL);
@@ -189,6 +195,10 @@
 	passport = params[0];
 
 	if (swboard->total_users == 1) {
+		GaimConversation *conv;
+
+		conv = gaim_find_conversation(msn_user_get_passport(swboard->user));
+
 		swboard->chat = serv_got_joined_chat(gc, ++swboard->chat_id,
 											 "MSN Chat");
 		gaim_chat_add_user(GAIM_CHAT(swboard->chat),
@@ -197,6 +207,8 @@
 						   gaim_account_get_username(account), NULL);
 
 		msn_user_unref(swboard->user);
+
+		gaim_conversation_destroy(conv);
 	}
 
 	if (swboard->chat != NULL)

mercurial