diff libpurple/protocols/myspace/myspace.c @ 28249:e4b0bf56667f

Explicitly add a stub for the status mood myspace messages. Closes #9887. Patch from Justin Williams (although Mark's change also fixed it so that these messages won't pop-up as IMs).
author Paul Aurich <paul@darkrain42.org>
date Thu, 13 Aug 2009 15:55:19 +0000
parents b59aa0c36b2b
children 5a367a023195
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Thu Aug 13 04:05:13 2009 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Thu Aug 13 15:55:19 2009 +0000
@@ -1341,6 +1341,27 @@
 	return ret;
 }
 #endif
+/**
+ * Process incoming status mood messages.
+ *
+ * @param session
+ * @param msg Status mood update message. Caller frees.
+ *
+ * @return TRUE if successful.
+ */
+static gboolean
+msim_incoming_status_mood(MsimSession *session, MsimMessage *msg) {
+	/* TODO: I dont know too much about this yet,
+	 * so until I see how the official client handles
+	 * this and decide if libpurple should as well,
+	 * well just say we used it
+	 */
+	gchar *ss;
+	ss = msim_msg_get_string(msg, "msg");
+	purple_debug_info("msim", "Incoming Status Message: %s", ss ? ss : "(NULL)");
+	g_free(ss);
+	return TRUE;
+}
 
 /**
  * Process incoming status messages.
@@ -1692,6 +1713,8 @@
 			return msim_incoming_media(session, msg);
 		case MSIM_BM_UNOFFICIAL_CLIENT:
 			return msim_incoming_unofficial_client(session, msg);
+		case MSIM_BM_STATUS_MOOD:
+			return msim_incoming_status_mood(session, msg);
 		default:
 			/*
 			 * Unknown message type!  We used to call