# HG changeset patch # User Paul Aurich # Date 1228981100 0 # Node ID 915b1cafa3d119c891b3d19c1eb56b142b02b92c # Parent 0e397f1851667e475771a295151c035bdd03b138 Support an empty element to indicate that a user has no XEP-0084 User Avatar. Refs #7732, which also has another patch needing further review. committer: John Bailey diff -r 0e397f185166 -r 915b1cafa3d1 ChangeLog --- a/ChangeLog Thu Dec 11 06:50:38 2008 +0000 +++ b/ChangeLog Thu Dec 11 07:38:20 2008 +0000 @@ -44,6 +44,8 @@ * Send "client-accepts-full-bind-result" attribute during SASL login. This will fix Google Talk login failures if the user configures the wrong domain for his/her account. + * Support new element to indicate no XEP-0084 User Avatar + (Paul Aurich) Zephyr: * Enable auto-reply, to emulate 'zaway' (Toby Schaffer) diff -r 0e397f185166 -r 915b1cafa3d1 libpurple/protocols/jabber/buddy.c --- a/libpurple/protocols/jabber/buddy.c Thu Dec 11 06:50:38 2008 +0000 +++ b/libpurple/protocols/jabber/buddy.c Thu Dec 11 07:38:20 2008 +0000 @@ -1525,9 +1525,12 @@ purple_buddy_icons_set_for_user(purple_connection_get_account(js->gc), from, NULL, 0, NULL); } else { xmlnode *info, *goodinfo = NULL; - + gboolean has_children = FALSE; + /* iterate over all info nodes to get one we can use */ for(info = metadata->child; info; info = info->next) { + if(info->type == XMLNODE_TYPE_TAG) + has_children = TRUE; if(info->type == XMLNODE_TYPE_TAG && !strcmp(info->name,"info")) { const char *type = xmlnode_get_attrib(info,"type"); const char *id = xmlnode_get_attrib(info,"id"); @@ -1542,7 +1545,9 @@ goodinfo = info; } } - if(goodinfo) { + if(has_children == FALSE) { + purple_buddy_icons_set_for_user(purple_connection_get_account(js->gc), from, NULL, 0, NULL); + } else if(goodinfo) { const char *url = xmlnode_get_attrib(goodinfo, "url"); const char *id = xmlnode_get_attrib(goodinfo,"id");