Mercurial > pidgin
diff libpurple/protocols/jabber/presence.c @ 29469: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 | d9c97c2b29fd |
children | 185677f47825 |
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); }