# HG changeset patch # User Yoshiki Yazawa # Date 1206698182 0 # Node ID 22114ffecd7929746e2ff4caea56afe1f57e3189 # Parent b99bc0b58a029bd66a44f0ecc938f3bb668022f9# Parent 1168dc635ac15dceb211b1b031047f23b922d1bf propagate from branch 'im.pidgin.pidgin' (head 8694cdf8884d0e71329ba9e829123eb4e3fc5fa7) to branch 'im.pidgin.pidgin.yaz' (head 67af3527d4e252ced1e36a9beaccba529b87b33b) diff -r b99bc0b58a02 -r 22114ffecd79 libpurple/protocols/msn/notification.c --- a/libpurple/protocols/msn/notification.c Thu Mar 27 07:10:14 2008 +0000 +++ b/libpurple/protocols/msn/notification.c Fri Mar 28 09:56:22 2008 +0000 @@ -1039,6 +1039,7 @@ PurpleConnection *gc; MsnUser *user; MsnObject *msnobj; + unsigned long clientid; int wlmclient; const char *state, *passport, *friendly; @@ -1064,6 +1065,9 @@ msn_user_set_object(user, msnobj); } + clientid = strtoul(cmd->params[5], NULL, 10); + user->mobile = (clientid & MSN_CLIENT_CAP_MSNMOBILE) || (user->phone.mobile && user->phone.mobile[0] == '+'); + msn_user_set_state(user, state); msn_user_update(user); } @@ -1179,7 +1183,7 @@ } clientid = strtoul(cmd->params[4], NULL, 10); - user->mobile = (clientid & MSN_CLIENT_CAP_MSNMOBILE); + user->mobile = (clientid & MSN_CLIENT_CAP_MSNMOBILE) || (user->phone.mobile && user->phone.mobile[0] == '+'); msn_user_set_state(user, state); msn_user_update(user); diff -r b99bc0b58a02 -r 22114ffecd79 libpurple/protocols/msn/user.c --- a/libpurple/protocols/msn/user.c Thu Mar 27 07:10:14 2008 +0000 +++ b/libpurple/protocols/msn/user.c Fri Mar 28 09:56:22 2008 +0000 @@ -97,8 +97,22 @@ if (user->status != NULL) { gboolean offline = (strcmp(user->status, "offline") == 0); - purple_prpl_got_user_status(account, user->passport, user->status, - "message", user->statusline, NULL); + + if (!offline) { + purple_prpl_got_user_status(account, user->passport, user->status, + "message", user->statusline, NULL); + } else { + if (user->mobile) { + purple_prpl_got_user_status(account, user->passport, "mobile", NULL); + purple_prpl_got_user_status(account, user->passport, "available", NULL); + } else { + purple_prpl_got_user_status(account, user->passport, user->status, NULL); + } + } + + if (!offline || !user->mobile) { + purple_prpl_got_user_status_deactive(account, user->passport, "mobile"); + } if (!offline && user->media.title) { purple_prpl_got_user_status(account, user->passport, "tune", @@ -108,13 +122,7 @@ NULL); } else { purple_prpl_got_user_status_deactive(account, user->passport, "tune"); - } - - if (!offline && user->mobile) { - purple_prpl_got_user_status(account, user->passport, "mobile", NULL); - } else { - purple_prpl_got_user_status_deactive(account, user->passport, "mobile"); - } + } } if (user->idle)