diff src/protocols/msn/msn.c @ 19830:3b971c87279d

[gaim-migrate @ 17056] fix the bug to send Yahoo User offline Message committed by MaYuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Sun, 27 Aug 2006 10:34:17 +0000
parents e45fae8209c3
children d99e36279d41
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Sun Aug 27 08:03:32 2006 +0000
+++ b/src/protocols/msn/msn.c	Sun Aug 27 10:34:17 2006 +0000
@@ -824,7 +824,8 @@
 	account = gaim_connection_get_account(gc);
 
 	msn_import_html(message, &msgformat, &msgtext);
-	if(msn_user_is_online(account, who)){
+	if(msn_user_is_online(account, who)||
+		msn_user_is_yahoo(account, who)){
 		/*User online,then send Online Instant Message*/
 
 		if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564)
@@ -849,8 +850,9 @@
 			MsnSwitchBoard *swboard;
 
 			session = gc->proto_data;
-			if(strstr(who,"yahoo") != NULL){
-				gaim_debug_info("MaYuan","send to Yahoo!\n");
+			if(msn_user_is_yahoo(account,who)){
+				/*we send the online and offline Message to Yahoo User via UBM*/
+				gaim_debug_info("MaYuan","send to Yahoo User\n");
 				uum_send_msg(session,msg);
 			}else{
 				gaim_debug_info("MaYuan","send via switchboard\n");
@@ -885,7 +887,7 @@
 
 		msn_message_destroy(msg);
 	}else	{
-		/*send Offline Instant Message*/
+		/*send Offline Instant Message,only to MSN Passport User*/
 		MsnSession *session;
 		MsnOim *oim;
 		char *friendname;