| 327 if(!(who = jabber_get_bare_jid(buddy->name))) |
327 if(!(who = jabber_get_bare_jid(buddy->name))) |
| 328 return; |
328 return; |
| 329 |
329 |
| 330 jb = jabber_buddy_find(js, buddy->name, FALSE); |
330 jb = jabber_buddy_find(js, buddy->name, FALSE); |
| 331 |
331 |
| |
332 /* |
| |
333 * For some reason if we're waiting for our subscription request |
| |
334 * to be approved and we try to add the buddy to another group |
| |
335 * then we remove the buddy from the old group. I don't understand |
| |
336 * the rationale for this, can someone please explain it? It seems |
| |
337 * like we should pass NULL as the groups parameter to |
| |
338 * jabber_roster_update(). |
| |
339 */ |
| 332 if(!jb || !(jb->subscription & JABBER_SUB_TO)) { |
340 if(!jb || !(jb->subscription & JABBER_SUB_TO)) { |
| 333 groups = g_slist_append(groups, group->name); |
341 groups = g_slist_append(groups, group->name); |
| 334 } |
342 } |
| 335 |
343 |
| 336 jabber_roster_update(js, who, groups); |
344 jabber_roster_update(js, who, groups); |