diff options
author | Paul Aurich <darkrain42@pidgin.im> | 2009-01-21 20:58:07 +0000 |
---|---|---|
committer | Paul Aurich <darkrain42@pidgin.im> | 2009-01-21 20:58:07 +0000 |
commit | 058bbcd4b0e503615718137c980ad02c9eec0f18 (patch) | |
tree | 050e648d5d61195ab28734d2eb624163bca172c1 | |
parent | 48c8577068406236c7ec933585a1f161aa857034 (diff) | |
download | pidgin-058bbcd4b0e503615718137c980ad02c9eec0f18.tar.gz |
Send presence updates from jabber_set_info, not jabber_set_buddy_icon.
If we change our photo at login, that may happen after we've sent initial
presence, so we need to re-send presence with the vcard-temp included.
-rw-r--r-- | libpurple/protocols/jabber/buddy.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libpurple/protocols/jabber/buddy.c b/libpurple/protocols/jabber/buddy.c index a5bf3f33ef..6263b00e07 100644 --- a/libpurple/protocols/jabber/buddy.c +++ b/libpurple/protocols/jabber/buddy.c @@ -483,27 +483,24 @@ void jabber_set_info(PurpleConnection *gc, const char *info) } if (vc_node != NULL) { + PurpleAccount *account = purple_connection_get_account(js->gc); + iq = jabber_iq_new(js, JABBER_IQ_SET); xmlnode_insert_child(iq->node, vc_node); jabber_iq_send(iq); + + /* Send presence to update vcard-temp:x:update */ + jabber_presence_send(account, purple_account_get_active_status(account)); } } void jabber_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img) { - PurplePresence *gpresence; - PurpleStatus *status; - jabber_avatar_set(gc->proto_data, img); /* 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)); - - /* TODO: Call this in jabber_set_info() if avatar changed? */ - gpresence = purple_account_get_presence(gc->account); - status = purple_presence_get_active_status(gpresence); - jabber_presence_send(gc->account, status); } /* |