Mercurial > pidgin
comparison libpurple/protocols/jabber/buddy.c @ 25147:6d6e10476c52
Clean up jabber_presence_send
* Split out a version that acts as part of the prpl_info struct from one
called internally
Fix jabber_caps_broadcast_change
* "prpl-jabber"
* Don't leak memory
* Send a full presence stanza
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Fri, 21 Nov 2008 04:18:19 +0000 |
parents | f4cb55854e87 |
children | 7dcba13d0e28 |
comparison
equal
deleted
inserted
replaced
25146:4040da08a733 | 25147:6d6e10476c52 |
---|---|
491 } | 491 } |
492 } | 492 } |
493 | 493 |
494 void jabber_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img) | 494 void jabber_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img) |
495 { | 495 { |
496 PurplePresence *gpresence; | |
497 PurpleStatus *status; | |
498 | |
499 if(((JabberStream*)gc->proto_data)->pep) { | 496 if(((JabberStream*)gc->proto_data)->pep) { |
500 /* XEP-0084: User Avatars */ | 497 /* XEP-0084: User Avatars */ |
501 if(img) { | 498 if(img) { |
502 /* | 499 /* |
503 * TODO: This is pretty gross. The Jabber PRPL really shouldn't | 500 * TODO: This is pretty gross. The Jabber PRPL really shouldn't |
623 one doesn't require a specific image type */ | 620 one doesn't require a specific image type */ |
624 | 621 |
625 /* publish vCard for those poor older clients */ | 622 /* publish vCard for those poor older clients */ |
626 jabber_set_info(gc, purple_account_get_user_info(gc->account)); | 623 jabber_set_info(gc, purple_account_get_user_info(gc->account)); |
627 | 624 |
628 gpresence = purple_account_get_presence(gc->account); | 625 jabber_presence_send(gc->proto_data, FALSE); |
629 status = purple_presence_get_active_status(gpresence); | |
630 jabber_presence_send(gc->account, status); | |
631 } | 626 } |
632 | 627 |
633 /* | 628 /* |
634 * This is the callback from the "ok clicked" for "set vCard" | 629 * This is the callback from the "ok clicked" for "set vCard" |
635 * | 630 * |