Mercurial > pidgin.yaz
changeset 18152:af0b9c6cbeb8
merge of 'a044da71f197bdd564f0d38ebb02798e06d1997f'
and 'e64c6a26887b59ce7ad568ea1c551938e673c7a0'
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 17 Jun 2007 05:09:21 +0000 |
parents | f88c2a41200d (diff) 428a3418bce5 (current diff) |
children | 7f23135d9b68 |
files | |
diffstat | 4 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c Sun Jun 17 04:11:38 2007 +0000 +++ b/libpurple/protocols/jabber/buddy.c Sun Jun 17 05:09:21 2007 +0000 @@ -443,14 +443,9 @@ void jabber_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img) { - PurplePresence *gpresence; - PurpleStatus *status; - jabber_set_info(gc, purple_account_get_user_info(gc->account)); - gpresence = purple_account_get_presence(gc->account); - status = purple_presence_get_active_status(gpresence); - jabber_presence_send(gc->account, status); + jabber_presence_send(gc->account, NULL); } /*
--- a/libpurple/protocols/jabber/disco.c Sun Jun 17 04:11:38 2007 +0000 +++ b/libpurple/protocols/jabber/disco.c Sun Jun 17 05:09:21 2007 +0000 @@ -226,10 +226,7 @@ jabber_roster_request(js); } - /* Send initial presence; this will trigger receipt of presence for contacts on the roster */ - gpresence = purple_account_get_presence(js->gc->account); - status = purple_presence_get_active_status(gpresence); - jabber_presence_send(js->gc->account, status); + /* when we get the roster back, we'll send our initial presence */ } static void
--- a/libpurple/protocols/jabber/presence.c Sun Jun 17 04:11:38 2007 +0000 +++ b/libpurple/protocols/jabber/presence.c Sun Jun 17 05:09:21 2007 +0000 @@ -102,6 +102,11 @@ JabberBuddyState state; int priority; + if(NULL == status) { + PurplePresence *gpresence = purple_account_get_presence(account); + status = purple_presence_get_active_status(gpresence); + } + if(!purple_status_is_active(status)) return;
--- a/libpurple/protocols/jabber/roster.c Sun Jun 17 04:11:38 2007 +0000 +++ b/libpurple/protocols/jabber/roster.c Sun Jun 17 05:09:21 2007 +0000 @@ -153,8 +153,6 @@ if(!query) return; - js->roster_parsed = TRUE; - for(item = xmlnode_get_child(query, "item"); item; item = xmlnode_get_next_twin(item)) { const char *jid, *name, *subscription, *ask; @@ -232,6 +230,14 @@ add_purple_buddies_to_groups(js, jid, name, groups); } } + + /* if we're just now parsing the roster for the first time, + * then now would be the time to send our initial presence */ + if(!js->roster_parsed) { + js->roster_parsed = TRUE; + + jabber_presence_send(js->gc->account, NULL); + } } static void jabber_roster_update(JabberStream *js, const char *name,