comparison 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
comparison
equal deleted inserted replaced
19829:c590e780b3a0 19830:3b971c87279d
822 822
823 gaim_debug_info("MaYuan","send IM {%s} to %s\n",message,who); 823 gaim_debug_info("MaYuan","send IM {%s} to %s\n",message,who);
824 account = gaim_connection_get_account(gc); 824 account = gaim_connection_get_account(gc);
825 825
826 msn_import_html(message, &msgformat, &msgtext); 826 msn_import_html(message, &msgformat, &msgtext);
827 if(msn_user_is_online(account, who)){ 827 if(msn_user_is_online(account, who)||
828 msn_user_is_yahoo(account, who)){
828 /*User online,then send Online Instant Message*/ 829 /*User online,then send Online Instant Message*/
829 830
830 if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564) 831 if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564)
831 { 832 {
832 g_free(msgformat); 833 g_free(msgformat);
847 { 848 {
848 MsnSession *session; 849 MsnSession *session;
849 MsnSwitchBoard *swboard; 850 MsnSwitchBoard *swboard;
850 851
851 session = gc->proto_data; 852 session = gc->proto_data;
852 if(strstr(who,"yahoo") != NULL){ 853 if(msn_user_is_yahoo(account,who)){
853 gaim_debug_info("MaYuan","send to Yahoo!\n"); 854 /*we send the online and offline Message to Yahoo User via UBM*/
855 gaim_debug_info("MaYuan","send to Yahoo User\n");
854 uum_send_msg(session,msg); 856 uum_send_msg(session,msg);
855 }else{ 857 }else{
856 gaim_debug_info("MaYuan","send via switchboard\n"); 858 gaim_debug_info("MaYuan","send via switchboard\n");
857 swboard = msn_session_get_swboard(session, who, MSN_SB_FLAG_IM); 859 swboard = msn_session_get_swboard(session, who, MSN_SB_FLAG_IM);
858 msn_switchboard_send_msg(swboard, msg, TRUE); 860 msn_switchboard_send_msg(swboard, msg, TRUE);
883 g_free(body_str); 885 g_free(body_str);
884 } 886 }
885 887
886 msn_message_destroy(msg); 888 msn_message_destroy(msg);
887 }else { 889 }else {
888 /*send Offline Instant Message*/ 890 /*send Offline Instant Message,only to MSN Passport User*/
889 MsnSession *session; 891 MsnSession *session;
890 MsnOim *oim; 892 MsnOim *oim;
891 char *friendname; 893 char *friendname;
892 894
893 gaim_debug_info("MaYuan","prepare to send offline Message\n"); 895 gaim_debug_info("MaYuan","prepare to send offline Message\n");