comparison src/protocols/jabber/roster.c @ 8185:3a229ad2fab0

[gaim-migrate @ 8906] take 1 of UberUglyHack committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 30 Jan 2004 21:56:31 +0000
parents 8f4ce853e685
children 22b3974dc1af
comparison
equal deleted inserted replaced
8184:f05d0a317f45 8185:3a229ad2fab0
174 jb->subscription |= JABBER_SUB_PENDING; 174 jb->subscription |= JABBER_SUB_PENDING;
175 else 175 else
176 jb->subscription &= ~JABBER_SUB_PENDING; 176 jb->subscription &= ~JABBER_SUB_PENDING;
177 177
178 if(jb->subscription == JABBER_SUB_NONE) { 178 if(jb->subscription == JABBER_SUB_NONE) {
179 jb = jabber_buddy_find(js, jid, FALSE);
180 if(jb)
181 jb->subscription = JABBER_SUB_NONE;
182 remove_gaim_buddies(js, jid); 179 remove_gaim_buddies(js, jid);
183 } else { 180 } else {
184 GSList *groups = NULL; 181 GSList *groups = NULL;
185 182
186 for(group = xmlnode_get_child(item, "group"); group; group = xmlnode_get_next_twin(group)) { 183 for(group = xmlnode_get_child(item, "group"); group; group = xmlnode_get_next_twin(group)) {
189 if(!(group_name = xmlnode_get_data(group))) 186 if(!(group_name = xmlnode_get_data(group)))
190 group_name = g_strdup(""); 187 group_name = g_strdup("");
191 groups = g_slist_append(groups, group_name); 188 groups = g_slist_append(groups, group_name);
192 } 189 }
193 add_gaim_buddies_in_groups(js, jid, name, groups); 190 add_gaim_buddies_in_groups(js, jid, name, groups);
191
192 if(jb->subscription == JABBER_SUB_BOTH) {
193 char *my_bare_jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain);
194 if(!strcmp(jid, my_bare_jid)) {
195 jabber_presence_fake_to_self(js, js->gc->away_state, js->gc->away);
196 }
197 g_free(my_bare_jid);
198 }
194 } 199 }
195 } 200 }
196 201
197 gaim_blist_save(); 202 gaim_blist_save();
198 } 203 }