make googletalk tune hack work, previously it's not doing anything unless

Sun, 06 Jul 2008 17:19:27 +0000

author
Ka-Hing Cheung <khc@pidgin.im>
date
Sun, 06 Jul 2008 17:19:27 +0000
changeset 23574
5c7073191c5a
parent 23571
1a323da99332
child 23575
7a22a015d694

make googletalk tune hack work, previously it's not doing anything unless
you also change other statuses

libpurple/protocols/jabber/presence.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/jabber/presence.c	Fri Jul 04 17:59:25 2008 +0000
+++ b/libpurple/protocols/jabber/presence.c	Sun Jul 06 17:19:27 2008 +0000
@@ -141,6 +141,11 @@
 	/* check for buzz support */
 	allowBuzz = purple_status_get_attr_boolean(status,"buzz");
 	/* changing the buzz state has to trigger a re-broadcasting of the presence for caps */
+
+	if (js->googletalk && stripped == NULL && purple_presence_is_status_primitive_active(p, PURPLE_STATUS_TUNE)) {
+		tune = purple_presence_get_status(p, "tune");
+		stripped = jabber_google_presence_outgoing(tune);
+	}
 	
 #define CHANGED(a,b) ((!a && b) || (a && a[0] == '\0' && b && b[0] != '\0') || \
 					  (a && !b) || (a && a[0] != '\0' && b && b[0] == '\0') || (a && b && strcmp(a,b)))
@@ -149,11 +154,6 @@
 		js->old_priority != priority || CHANGED(js->old_avatarhash, js->avatar_hash)) {
 		js->allowBuzz = allowBuzz;
 
-		if (js->googletalk && stripped == NULL && purple_presence_is_status_primitive_active(p, PURPLE_STATUS_TUNE)) {
-			tune = purple_presence_get_status(p, "tune");
-			stripped = jabber_google_presence_outgoing(tune);
-		}
-
 		presence = jabber_presence_create_js(js, state, stripped, priority);
 
 		if(js->avatar_hash) {

mercurial