Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
18123:ca965dfd3875 | 18124:f88c2a41200d |
---|---|
151 | 151 |
152 query = xmlnode_get_child(packet, "query"); | 152 query = xmlnode_get_child(packet, "query"); |
153 if(!query) | 153 if(!query) |
154 return; | 154 return; |
155 | 155 |
156 js->roster_parsed = TRUE; | |
157 | |
158 for(item = xmlnode_get_child(query, "item"); item; item = xmlnode_get_next_twin(item)) | 156 for(item = xmlnode_get_child(query, "item"); item; item = xmlnode_get_next_twin(item)) |
159 { | 157 { |
160 const char *jid, *name, *subscription, *ask; | 158 const char *jid, *name, *subscription, *ask; |
161 JabberBuddy *jb; | 159 JabberBuddy *jb; |
162 | 160 |
230 if (!jabber_google_roster_incoming(js, item)) | 228 if (!jabber_google_roster_incoming(js, item)) |
231 continue; | 229 continue; |
232 add_purple_buddies_to_groups(js, jid, name, groups); | 230 add_purple_buddies_to_groups(js, jid, name, groups); |
233 } | 231 } |
234 } | 232 } |
233 | |
234 /* if we're just now parsing the roster for the first time, | |
235 * then now would be the time to send our initial presence */ | |
236 if(!js->roster_parsed) { | |
237 js->roster_parsed = TRUE; | |
238 | |
239 jabber_presence_send(js->gc->account, NULL); | |
240 } | |
235 } | 241 } |
236 | 242 |
237 static void jabber_roster_update(JabberStream *js, const char *name, | 243 static void jabber_roster_update(JabberStream *js, const char *name, |
238 GSList *grps) | 244 GSList *grps) |
239 { | 245 { |