Mercurial > pidgin.yaz
changeset 19784: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 | c590e780b3a0 |
children | ea8b7028e8bb |
files | src/protocols/msn/msn.c src/protocols/msn/user.c src/protocols/msn/user.h |
diffstat | 3 files changed, 20 insertions(+), 4 deletions(-) [+] |
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;
--- a/src/protocols/msn/user.c Sun Aug 27 08:03:32 2006 +0000 +++ b/src/protocols/msn/user.c Sun Aug 27 10:34:17 2006 +0000 @@ -315,6 +315,15 @@ return GAIM_BUDDY_IS_ONLINE(buddy); } +/*check to see if user is yahoo user? + * TODO: we need to identify it via contact parse + */ +gboolean +msn_user_is_yahoo(GaimAccount *account ,const char *name) +{ + return (strstr(name,"yahoo") != NULL); +} + void msn_user_remove_group_id(MsnUser *user, const char * id) {
--- a/src/protocols/msn/user.h Sun Aug 27 08:03:32 2006 +0000 +++ b/src/protocols/msn/user.h Sun Aug 27 10:34:17 2006 +0000 @@ -301,6 +301,11 @@ gboolean msn_user_is_online(GaimAccount *account, const char *name); +/** + * check to see if user is Yahoo User + */ +gboolean +msn_user_is_yahoo(GaimAccount *account ,const char *name); /*@}*/ #endif /* _MSN_USER_H_ */