diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2007-04-18 23:03:43 -0700 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2007-04-18 23:03:43 -0700 | 
| commit | f0cb961652cbd639e89dcd88a86f20a2414146c4 (patch) | |
| tree | 7bddf3e5f8cd1402639b134773adcb4d04c375dc /protocols/jabber/jabber_util.c | |
| parent | 33dc2618520409c0d52efff335fe299c26f6dd42 (diff) | |
More API changes: buddy list management. imcb_add_buddy() is now a *real*
callback, it's only called from inside IM-modules. This makes sure a buddy
only gets added to the BitlBee structures if the add was successful. This
gets rid of the weirdness described in #55. Unfortunately for now this
change breaks A) automatic renaming of ICQ contacts (if there are names
stored in the contact list) B) add -tmp.
Diffstat (limited to 'protocols/jabber/jabber_util.c')
| -rw-r--r-- | protocols/jabber/jabber_util.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c index 949a7a4b..3c0e71f4 100644 --- a/protocols/jabber/jabber_util.c +++ b/protocols/jabber/jabber_util.c @@ -222,7 +222,7 @@ static void jabber_buddy_ask_yes( gpointer w, struct jabber_buddy_ask_data *bla  {  	presence_send_request( bla->ic, bla->handle, "subscribed" ); -	if( find_buddy( bla->ic, bla->handle ) == NULL ) +	if( imcb_find_buddy( bla->ic, bla->handle ) == NULL )  		imcb_ask_add( bla->ic, bla->handle, NULL );  	g_free( bla->handle ); @@ -370,7 +370,7 @@ struct jabber_buddy *jabber_buddy_by_jid( struct im_connection *ic, char *jid_,  			}  		} -		if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && find_buddy( ic, jid ) ) +		if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && imcb_find_buddy( ic, jid ) )  		{  			*s = '/';  			bud = jabber_buddy_add( ic, jid ); @@ -390,7 +390,7 @@ struct jabber_buddy *jabber_buddy_by_jid( struct im_connection *ic, char *jid_,  		if( bud == NULL )  			/* No match. Create it now? */ -			return ( ( flags & GET_BUDDY_CREAT ) && find_buddy( ic, jid_ ) ) ? +			return ( ( flags & GET_BUDDY_CREAT ) && imcb_find_buddy( ic, jid_ ) ) ?  			           jabber_buddy_add( ic, jid_ ) : NULL;  		else if( bud->resource && ( flags & GET_BUDDY_EXACT ) )  			/* We want an exact match, so in thise case there shouldn't be a /resource. */  | 
