changeset 16848:133932a97faa

Make MSN mobile buddies offline, mobile, and offline-messagable. Fixes #215
author Sean Egan <seanegan@gmail.com>
date Fri, 04 May 2007 03:48:12 +0000
parents 504613f178a0
children 28251f5bcd6a
files libpurple/protocols/msn/msn.c libpurple/protocols/msn/user.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Fri May 04 01:46:42 2007 +0000
+++ b/libpurple/protocols/msn/msn.c	Fri May 04 03:48:12 2007 +0000
@@ -368,6 +368,14 @@
 					   data);
 }
 
+static gboolean
+msn_offline_message(const PurpleBuddy *buddy) {
+	if (buddy == NULL)
+		return FALSE;
+	MsnUser *user = buddy->proto_data;
+	return user && user->mobile;
+}
+
 static void
 initiate_chat_cb(PurpleBlistNode *node, gpointer data)
 {
@@ -2065,7 +2073,7 @@
 	msn_can_receive_file,	/* can_receive_file */
 	msn_send_file,			/* send_file */
 	msn_new_xfer,			/* new_xfer */
-	NULL,					/* offline_message */
+	msn_offline_message,			/* offline_message */
 	NULL,					/* whiteboard_prpl_ops */
 	NULL,					/* send_raw */
 	NULL,					/* roomlist_room_serialize */
--- a/libpurple/protocols/msn/user.c	Fri May 04 01:46:42 2007 +0000
+++ b/libpurple/protocols/msn/user.c	Fri May 04 03:48:12 2007 +0000
@@ -83,7 +83,7 @@
 
 	if (user->status != NULL) {
 		if (!strcmp(user->status, "offline") && user->mobile) {
-			purple_prpl_got_user_status(account, user->passport, "available", NULL);
+			purple_prpl_got_user_status(account, user->passport, "offline", NULL);
 			purple_prpl_got_user_status(account, user->passport, "mobile", NULL);
 		} else {
 			purple_prpl_got_user_status(account, user->passport, user->status, NULL);