Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/roster.c @ 18124:f88c2a41200d
fix inital presence (fixes #1395)
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 17 Jun 2007 04:50:18 +0000 |
parents | 32c366eeeb99 |
children | 6950ffd2291f |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/roster.c Sun Jun 17 04:44:03 2007 +0000 +++ b/libpurple/protocols/jabber/roster.c Sun Jun 17 04:50:18 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,