Mercurial > pidgin
diff src/protocols/jabber/buddy.c @ 11361:e4868370c433
[gaim-migrate @ 13585]
cleaning out my tree
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 29 Aug 2005 04:53:17 +0000 |
parents | 519dc2186438 |
children | ce2a2e793835 |
line wrap: on
line diff
--- a/src/protocols/jabber/buddy.c Sun Aug 28 22:46:01 2005 +0000 +++ b/src/protocols/jabber/buddy.c Mon Aug 29 04:53:17 2005 +0000 @@ -256,8 +256,8 @@ {N_("Region"), NULL, TRUE, TRUE, "REGION", "ADR", NULL}, {N_("Postal Code"), NULL, TRUE, TRUE, "PCODE", "ADR", NULL}, {N_("Country"), NULL, TRUE, TRUE, "COUNTRY", "ADR", NULL}, - {N_("Telephone"), NULL, TRUE, TRUE, "TEL", NULL, NULL}, - {N_("Email"), NULL, TRUE, TRUE, "EMAIL", NULL, "<A HREF=\"mailto:%s\">%s</A>"}, + {N_("Telephone"), NULL, TRUE, TRUE, "NUMBER", "TEL", NULL}, + {N_("Email"), NULL, TRUE, TRUE, "USERID", "EMAIL", "<A HREF=\"mailto:%s\">%s</A>"}, {N_("Organization Name"), NULL, TRUE, TRUE, "ORGNAME", "ORG", NULL}, {N_("Organization Unit"), NULL, TRUE, TRUE, "ORGUNIT", "ORG", NULL}, {N_("Title"), NULL, TRUE, TRUE, "TITLE", NULL, NULL}, @@ -598,6 +598,9 @@ if(!from) return; + if(!(jb = jabber_buddy_find(js, from, TRUE))) + return; + /* XXX: handle the error case */ resource_name = jabber_get_resource(from); @@ -605,7 +608,7 @@ b = gaim_find_buddy(js->gc->account, bare_jid); - jb = jabber_buddy_find(js, from, TRUE); + info_text = g_string_new(""); g_string_append_printf(info_text, "<b>%s:</b> %s<br/>", _("Jabber ID"), @@ -808,8 +811,10 @@ !strcmp(child->name, "LOGO")) { char *bintext = NULL; xmlnode *binval; - if((binval = xmlnode_get_child(child, "BINVAL")) && - (bintext = xmlnode_get_data(binval))) { + + if( ((binval = xmlnode_get_child(child, "BINVAL")) && + (bintext = xmlnode_get_data(binval))) || + (bintext = xmlnode_get_data(child))) { gsize size; guchar *data; int i; @@ -817,7 +822,7 @@ char *p, hash[41]; gboolean photo = (strcmp(child->name, "PHOTO") == 0); - data = gaim_base64_decode(text, &size); + data = gaim_base64_decode(bintext, &size); imgids = g_slist_prepend(imgids, GINT_TO_POINTER(gaim_imgstore_add(data, size, "logo.png"))); g_string_append_printf(info_text,