diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-15 18:19:06 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-15 18:19:06 +0100 | 
| commit | 9b01339168bc79d08c4e371552cc44648bd8878d (patch) | |
| tree | db607b25d1f30ce4d9d52e39860b3031220caade /protocols | |
| parent | 9679fd8f3141abb0cabe7b036cf96c3de40ee22a (diff) | |
Check the <isMessengerUser/> flag in address book entries, ignore the ones
that have it set to false, or this code will add all non-Messenger contacts
to the contact list (oops).
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/msn/soap.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index fe716d9d..91f93afd 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -682,7 +682,7 @@ static xt_status msn_soap_addressbook_contact( struct xt_node *node, gpointer da  	bee_user_t *bu;  	struct msn_buddy_data *bd;  	struct xt_node *p; -	char *id = NULL, *type = NULL, *handle = NULL, +	char *id = NULL, *type = NULL, *handle = NULL, *is_msgr = "false",  	     *display_name = NULL, *group_id = NULL;  	struct msn_soap_req_data *soap_req = data;  	struct im_connection *ic = soap_req->ic; @@ -696,6 +696,8 @@ static xt_status msn_soap_addressbook_contact( struct xt_node *node, gpointer da  		handle = p->text;  	if( ( p = xt_find_node( node->children, "displayName" ) ) )  		display_name = p->text; +	if( ( p = xt_find_node( node->children, "isMessengerUser" ) ) ) +		is_msgr = p->text;  	if( ( p = xt_find_path( node, "groupIds/guid" ) ) )  		group_id = p->text; @@ -708,7 +710,7 @@ static xt_status msn_soap_addressbook_contact( struct xt_node *node, gpointer da  		return XT_HANDLED;  	} -	if( handle == NULL ) +	if( !bool2int( is_msgr ) || handle == NULL )  		return XT_HANDLED;  	if( !( bu = bee_user_by_handle( ic->bee, ic, handle ) ) && | 
