changeset 29863:5d56c0dd2810

jabber: Actually send a mood update when setting a mood status (using the generic mood selector).
author Marcus Lundblad <ml@update.uu.se>
date Wed, 10 Feb 2010 20:53:18 +0000
parents b052a711cfbd
children 5b1b7c5393f6
files libpurple/protocols/jabber/presence.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Tue Feb 09 22:07:48 2010 +0000
+++ b/libpurple/protocols/jabber/presence.c	Wed Feb 10 20:53:18 2010 +0000
@@ -40,6 +40,7 @@
 #include "jutil.h"
 #include "adhoccommands.h"
 
+#include "usermood.h"
 #include "usertune.h"
 
 
@@ -128,6 +129,15 @@
 
 	gc = purple_account_get_connection(account);
 	js = purple_connection_get_protocol_data(gc);
+
+	/* it's a mood update */
+	if (purple_status_type_get_primitive(purple_status_get_type(status)) == PURPLE_STATUS_MOOD) {
+		const char *mood =
+			purple_status_get_attr_string(status, PURPLE_MOOD_NAME);
+		jabber_mood_set(js, mood, NULL);
+		return;
+	}
+
 	jabber_presence_send(js, FALSE);
 }