diff options
Diffstat (limited to 'protocols/jabber')
| -rw-r--r-- | protocols/jabber/jabber_util.c | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c index ec23919e..120a56b6 100644 --- a/protocols/jabber/jabber_util.c +++ b/protocols/jabber/jabber_util.c @@ -419,9 +419,13 @@ struct jabber_buddy *jabber_buddy_by_jid( struct im_connection *ic, char *jid_,  	if( ( s = strchr( jid, '/' ) ) )  	{ +		int bare_exists = 0; +		  		*s = 0;  		if( ( bud = g_hash_table_lookup( jd->buddies, jid ) ) )  		{ +			bare_exists = 1; +			  			if( bud->next )  				bud = bud->next; @@ -447,7 +451,8 @@ struct jabber_buddy *jabber_buddy_by_jid( struct im_connection *ic, char *jid_,  					break;  		} -		if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && imcb_find_buddy( ic, jid ) ) +		if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && +		    ( imcb_find_buddy( ic, jid ) || bare_exists ) )  		{  			*s = '/';  			bud = jabber_buddy_add( ic, jid ); | 
