pidgin: 777b9e65: Explicitly add a stub for the status moo...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Thu Aug 13 22:54:11 EDT 2009


-----------------------------------------------------------------
Revision: 777b9e651a771f8fac5e480e094c740ee495ca06
Ancestor: 20320727f6c8f5a4a4b7b8c0f65c74a57ada1e15
Author: darkrain42 at pidgin.im
Date: 2009-08-13T15:55:19
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/777b9e651a771f8fac5e480e094c740ee495ca06

Modified files:
        ChangeLog libpurple/protocols/myspace/myspace.c
        libpurple/protocols/myspace/myspace.h

ChangeLog: 

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).

-------------- next part --------------
============================================================
--- ChangeLog	a5786f9df9c5685f84a863c5a1c6a5059a77bbfd
+++ ChangeLog	e01673383246964b98d6048e299a31a1c8557a3e
@@ -47,6 +47,8 @@ version 2.6.0 (??/??/2009):
 	* Various memory leaks fixed as reported by Josh Mueller.
 	* Properly handle an IRC buddy appearing in multiple groups.
 	* Escape HTML entities in usernames when written with the HTML logger.
+	* Do not display MySpace status changes as incoming IMs.  (Mark Doliner and
+	  Justin Williams)
 
 	AIM and ICQ:
 	* Preliminary support for a new authentication scheme called
============================================================
--- libpurple/protocols/myspace/myspace.c	71ae7fc8b2c859517e62901192c558815f9c18ec
+++ libpurple/protocols/myspace/myspace.c	b4e51e219bdd6a16eec98f3825d8f8774c9bd407
@@ -1341,6 +1341,27 @@ msim_send_unofficial_client(MsimSession 
 	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 @@ msim_incoming_bm(MsimSession *session, M
 			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
============================================================
--- libpurple/protocols/myspace/myspace.h	d592752d6d66d8afacd8eb2503a380209c36f591
+++ libpurple/protocols/myspace/myspace.h	5a9e08e0a00f2e192a2b06d60b6e9a64659d6dff
@@ -132,6 +132,7 @@
 #define MSIM_BM_ACTION_OR_IM_INSTANT    121
 #define MSIM_BM_MEDIA                   122
 #define MSIM_BM_PROFILE                 124
+#define MSIM_BM_STATUS_MOOD             126
 #define MSIM_BM_UNOFFICIAL_CLIENT       200
 
 /* Authentication algorithm for login2 */


More information about the Commits mailing list