comparison 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
comparison
equal deleted inserted replaced
29468:b052a711cfbd 29469:5d56c0dd2810
38 #include "presence.h" 38 #include "presence.h"
39 #include "iq.h" 39 #include "iq.h"
40 #include "jutil.h" 40 #include "jutil.h"
41 #include "adhoccommands.h" 41 #include "adhoccommands.h"
42 42
43 #include "usermood.h"
43 #include "usertune.h" 44 #include "usertune.h"
44 45
45 46
46 static void chats_send_presence_foreach(gpointer key, gpointer val, 47 static void chats_send_presence_foreach(gpointer key, gpointer val,
47 gpointer user_data) 48 gpointer user_data)
126 return; 127 return;
127 } 128 }
128 129
129 gc = purple_account_get_connection(account); 130 gc = purple_account_get_connection(account);
130 js = purple_connection_get_protocol_data(gc); 131 js = purple_connection_get_protocol_data(gc);
132
133 /* it's a mood update */
134 if (purple_status_type_get_primitive(purple_status_get_type(status)) == PURPLE_STATUS_MOOD) {
135 const char *mood =
136 purple_status_get_attr_string(status, PURPLE_MOOD_NAME);
137 jabber_mood_set(js, mood, NULL);
138 return;
139 }
140
131 jabber_presence_send(js, FALSE); 141 jabber_presence_send(js, FALSE);
132 } 142 }
133 143
134 void jabber_presence_send(JabberStream *js, gboolean force) 144 void jabber_presence_send(JabberStream *js, gboolean force)
135 { 145 {