# HG changeset patch # User Ka-Hing Cheung # Date 1215364767 0 # Node ID 146d16459cda18df15b175c7738a8e8e3373ecb9 # Parent 9ad75be23c9394fc8443512f74c92f4ea4341967 make googletalk tune hack work, previously it's not doing anything unless you also change other statuses diff -r 9ad75be23c93 -r 146d16459cda libpurple/protocols/jabber/presence.c --- 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) {