Mercurial > pidgin.yaz
changeset 6026:01dd6b652c22
[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.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 05 Jul 2003 07:16:22 +0000 |
parents | f515cef823f9 |
children | 264028967b24 |
files | src/protocols/msn/msn.c src/protocols/msn/switchboard.c |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)