# HG changeset patch # User Paul Aurich # Date 1231301531 0 # Node ID c07b0aa88a35418a5fd15e87a507a679840c4cc5 # Parent 7bc52fed6fdb28b1eea88148de2da1bfbb3cdff7 Paul noticed that the conditional blocks here were backwards. I'm surprised no one seems to have noticed this before now. References #7974 committer: Etan Reisner diff -r 7bc52fed6fdb -r c07b0aa88a35 libpurple/protocols/jabber/buddy.c --- a/libpurple/protocols/jabber/buddy.c Wed Jan 07 03:31:23 2009 +0000 +++ b/libpurple/protocols/jabber/buddy.c Wed Jan 07 04:12:11 2009 +0000 @@ -578,32 +578,30 @@ jabber_pep_publish((JabberStream*)gc->proto_data, publish); g_free(hash); - } else { /* if(img) */ - /* remove the metadata */ - xmlnode *metadata, *item; - xmlnode *publish = xmlnode_new("publish"); - xmlnode_set_attrib(publish,"node",AVATARNAMESPACEMETA); - - item = xmlnode_new_child(publish, "item"); - - metadata = xmlnode_new_child(item, "metadata"); - xmlnode_set_namespace(metadata,AVATARNAMESPACEMETA); - - xmlnode_new_child(metadata, "stop"); - - /* publish the metadata */ - jabber_pep_publish((JabberStream*)gc->proto_data, publish); + } else { + purple_debug_error("jabber", "jabber_set_buddy_icon received non-png data"); } } else { - purple_debug(PURPLE_DEBUG_ERROR, "jabber", - "jabber_set_buddy_icon received non-png data"); + /* remove the metadata */ + xmlnode *metadata, *item; + xmlnode *publish = xmlnode_new("publish"); + xmlnode_set_attrib(publish,"node",AVATARNAMESPACEMETA); + + item = xmlnode_new_child(publish, "item"); + + metadata = xmlnode_new_child(item, "metadata"); + xmlnode_set_namespace(metadata,AVATARNAMESPACEMETA); + + xmlnode_new_child(metadata, "stop"); + + /* publish the metadata */ + jabber_pep_publish((JabberStream*)gc->proto_data, publish); } } - /* even when the image is not png, we can still publish the vCard, since this - one doesn't require a specific image type */ - - /* publish vCard for those poor older clients */ + /* vCard avatars do not have an image type requirement so update our + * vCard avatar regardless of image type for those poor older clients + */ jabber_set_info(gc, purple_account_get_user_info(gc->account)); gpresence = purple_account_get_presence(gc->account);