Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/presence.c @ 15957:84bf0f949b0b
fix prompting to add a buddy after authorization if they're already on our list
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Wed, 28 Mar 2007 02:32:03 +0000 |
parents | 87ea711b9781 |
children | e0c9a46b459f 08db93bbd798 |
comparison
equal
deleted
inserted
replaced
15956:5d9e85f2eba4 | 15957:84bf0f949b0b |
---|---|
286 PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(js->gc), from); | 286 PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(js->gc), from); |
287 JabberBuddy *jb = NULL; | 287 JabberBuddy *jb = NULL; |
288 | 288 |
289 if (buddy) { | 289 if (buddy) { |
290 jb = jabber_buddy_find(js, from, TRUE); | 290 jb = jabber_buddy_find(js, from, TRUE); |
291 if ((jb->subscription & JABBER_SUB_TO) == 0) | 291 if ((jb->subscription & JABBER_SUB_TO)) |
292 onlist = TRUE; | 292 onlist = TRUE; |
293 } | 293 } |
294 | 294 |
295 jap->gc = js->gc; | 295 jap->gc = js->gc; |
296 jap->who = g_strdup(from); | 296 jap->who = g_strdup(from); |
297 jap->js = js; | 297 jap->js = js; |
298 | 298 |
299 purple_account_request_authorization(purple_connection_get_account(js->gc), from, NULL, NULL, NULL, onlist, | 299 purple_account_request_authorization(purple_connection_get_account(js->gc), from, NULL, NULL, NULL, onlist, |
300 G_CALLBACK(authorize_add_cb), G_CALLBACK(deny_add_cb), jap); | 300 G_CALLBACK(authorize_add_cb), G_CALLBACK(deny_add_cb), jap); |
301 jabber_id_free(jid); | 301 jabber_id_free(jid); |
302 return; | 302 return; |
303 } else if(type && !strcmp(type, "subscribed")) { | 303 } else if(type && !strcmp(type, "subscribed")) { |
304 /* we've been allowed to see their presence, but we don't care */ | 304 /* we've been allowed to see their presence, but we don't care */ |
305 jabber_id_free(jid); | 305 jabber_id_free(jid); |