Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/buddy.c @ 24914:c07b0aa88a35
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 <pidgin@unreliablesource.net>
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 07 Jan 2009 04:12:11 +0000 |
parents | 61e0924de04a |
children | 1e121a3eceeb |
comparison
equal
deleted
inserted
replaced
24913:7bc52fed6fdb | 24914:c07b0aa88a35 |
---|---|
576 | 576 |
577 /* publish the metadata */ | 577 /* publish the metadata */ |
578 jabber_pep_publish((JabberStream*)gc->proto_data, publish); | 578 jabber_pep_publish((JabberStream*)gc->proto_data, publish); |
579 | 579 |
580 g_free(hash); | 580 g_free(hash); |
581 } else { /* if(img) */ | 581 } else { |
582 /* remove the metadata */ | 582 purple_debug_error("jabber", "jabber_set_buddy_icon received non-png data"); |
583 xmlnode *metadata, *item; | |
584 xmlnode *publish = xmlnode_new("publish"); | |
585 xmlnode_set_attrib(publish,"node",AVATARNAMESPACEMETA); | |
586 | |
587 item = xmlnode_new_child(publish, "item"); | |
588 | |
589 metadata = xmlnode_new_child(item, "metadata"); | |
590 xmlnode_set_namespace(metadata,AVATARNAMESPACEMETA); | |
591 | |
592 xmlnode_new_child(metadata, "stop"); | |
593 | |
594 /* publish the metadata */ | |
595 jabber_pep_publish((JabberStream*)gc->proto_data, publish); | |
596 } | 583 } |
597 } else { | 584 } else { |
598 purple_debug(PURPLE_DEBUG_ERROR, "jabber", | 585 /* remove the metadata */ |
599 "jabber_set_buddy_icon received non-png data"); | 586 xmlnode *metadata, *item; |
600 } | 587 xmlnode *publish = xmlnode_new("publish"); |
601 } | 588 xmlnode_set_attrib(publish,"node",AVATARNAMESPACEMETA); |
602 | 589 |
603 /* even when the image is not png, we can still publish the vCard, since this | 590 item = xmlnode_new_child(publish, "item"); |
604 one doesn't require a specific image type */ | 591 |
605 | 592 metadata = xmlnode_new_child(item, "metadata"); |
606 /* publish vCard for those poor older clients */ | 593 xmlnode_set_namespace(metadata,AVATARNAMESPACEMETA); |
594 | |
595 xmlnode_new_child(metadata, "stop"); | |
596 | |
597 /* publish the metadata */ | |
598 jabber_pep_publish((JabberStream*)gc->proto_data, publish); | |
599 } | |
600 } | |
601 | |
602 /* vCard avatars do not have an image type requirement so update our | |
603 * vCard avatar regardless of image type for those poor older clients | |
604 */ | |
607 jabber_set_info(gc, purple_account_get_user_info(gc->account)); | 605 jabber_set_info(gc, purple_account_get_user_info(gc->account)); |
608 | 606 |
609 gpresence = purple_account_get_presence(gc->account); | 607 gpresence = purple_account_get_presence(gc->account); |
610 status = purple_presence_get_active_status(gpresence); | 608 status = purple_presence_get_active_status(gpresence); |
611 jabber_presence_send(gc->account, status); | 609 jabber_presence_send(gc->account, status); |