diff options
Diffstat (limited to 'protocols/jabber/iq.c')
| -rw-r--r-- | protocols/jabber/iq.c | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c index 77c0d628..5166e322 100644 --- a/protocols/jabber/iq.c +++ b/protocols/jabber/iq.c @@ -381,7 +381,7 @@ static xt_status jabber_parse_roster( struct im_connection *ic, struct xt_node *  	c = query->children;  	while( ( c = xt_find_node( c, "item" ) ) )  	{ -		struct xt_node *group = xt_find_node( node->children, "group" ); +		struct xt_node *group = xt_find_node( c->children, "group" );  		char *jid = xt_find_attr( c, "jid" );  		char *name = xt_find_attr( c, "name" );  		char *sub = xt_find_attr( c, "subscription" ); @@ -390,9 +390,8 @@ static xt_status jabber_parse_roster( struct im_connection *ic, struct xt_node *  		{  			if( ( strcmp( sub, "both" ) == 0 || strcmp( sub, "to" ) == 0 ) )  			{ -				if( initial || imcb_find_buddy( ic, jid ) == NULL ) -					imcb_add_buddy( ic, jid, ( group && group->text_len ) ? -					                           group->text : NULL ); +				imcb_add_buddy( ic, jid, ( group && group->text_len ) ? +				                           group->text : NULL );  				if( name )  					imcb_rename_buddy( ic, jid, name ); @@ -588,7 +587,7 @@ static xt_status jabber_add_to_roster_callback( struct im_connection *ic, struct  	    ( s = xt_find_attr( node, "type" ) ) &&  	    strcmp( s, "result" ) == 0 )  	{ -		if( imcb_find_buddy( ic, jid ) == NULL ) +		if( bee_user_by_handle( ic->bee, ic, jid ) == NULL )  			imcb_add_buddy( ic, jid, NULL );  	}  	else | 
