diff libpurple/protocols/msn/switchboard.c @ 23617:2eefa8dc7481

Properly send MSN nudges in a chat to the right window, and not open a new conversation for the person who sent the nudge. Fixes #4542.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 19 Jul 2008 03:07:33 +0000
parents 48024418982c
children a556012a56b9 e81f0d1966db
line wrap: on
line diff
--- a/libpurple/protocols/msn/switchboard.c	Sat Jul 19 03:03:17 2008 +0000
+++ b/libpurple/protocols/msn/switchboard.c	Sat Jul 19 03:07:33 2008 +0000
@@ -978,7 +978,13 @@
 		account = cmdproc->session->account;
 		user = msg->remote_user;
 
-		serv_got_attention(account->gc, user, MSN_NUDGE);
+		if (swboard->current_users > 1 ||
+			((swboard->conv != NULL) &&
+			 purple_conversation_get_type(swboard->conv) == PURPLE_CONV_TYPE_CHAT))
+			purple_prpl_got_attention_in_chat(account->gc, swboard->chat_id, user, MSN_NUDGE);
+
+		else
+			purple_prpl_got_attention(account->gc, user, MSN_NUDGE);
 
 	} else if (!strcmp(id, "2")) {
 		/* Wink */