pidgin: 1cdb28c0: make googletalk tune hack work, previous...

khc at pidgin.im khc at pidgin.im
Sun Jul 6 13:30:44 EDT 2008


-----------------------------------------------------------------
Revision: 1cdb28c0cf61decef2a61d7b72e8890425a4f377
Ancestor: 7ec23b3c9d370cf8f0c74580e751ca38fe000d3f
Author: khc at pidgin.im
Date: 2008-07-06T17:19:27
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1cdb28c0cf61decef2a61d7b72e8890425a4f377

Modified files:
        libpurple/protocols/jabber/presence.c

ChangeLog: 

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


-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/presence.c	969cd4281c60264367322996c483c2695daffa61
+++ libpurple/protocols/jabber/presence.c	3189dae16b40681279ad700a31da4e81e649af97
@@ -141,6 +141,11 @@ void jabber_presence_send(PurpleAccount 
 	/* 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 @@ void jabber_presence_send(PurpleAccount 
 		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) {


More information about the Commits mailing list