Changeset f0cb961 for protocols/jabber
- Timestamp:
- 2007-04-19T06:03:43Z (18 years ago)
- Branches:
- master
- Children:
- d323394c
- Parents:
- 33dc261
- Location:
- protocols/jabber
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/iq.c
r33dc261 rf0cb961 360 360 while( ( c = xt_find_node( c, "item" ) ) ) 361 361 { 362 struct xt_node *group = xt_find_node( node->children, "group" ); 362 363 char *jid = xt_find_attr( c, "jid" ); 363 364 char *name = xt_find_attr( c, "name" ); 364 365 char *sub = xt_find_attr( c, "subscription" ); 365 366 366 if( !jid || !sub ) 367 { 368 /* Maybe warn. But how likely is this to happen in the first place? */ 369 } 370 else if( initial ) 371 { 372 if( ( strcmp( sub, "both" ) == 0 || strcmp( sub, "to" ) == 0 ) ) 373 add_buddy( ic, NULL, jid, name ); 374 } 375 else 376 { 377 /* This is a roster push item. Find out what changed exactly. */ 367 if( jid && sub ) 368 { 378 369 if( ( strcmp( sub, "both" ) == 0 || strcmp( sub, "to" ) == 0 ) ) 379 370 { 380 if( find_buddy( ic, jid ) == NULL ) 381 add_buddy( ic, NULL, jid, name ); 382 else if( name ) 383 serv_buddy_rename( ic, jid, name ); 371 if( initial || imcb_find_buddy( ic, jid ) == NULL ) 372 imcb_add_buddy( ic, jid, ( group && group->text_len ) ? 373 group->text : NULL ); 374 375 imcb_rename_buddy( ic, jid, name ); 384 376 } 385 377 else if( strcmp( sub, "remove" ) == 0 ) -
protocols/jabber/jabber_util.c
r33dc261 rf0cb961 223 223 presence_send_request( bla->ic, bla->handle, "subscribed" ); 224 224 225 if( find_buddy( bla->ic, bla->handle ) == NULL )225 if( imcb_find_buddy( bla->ic, bla->handle ) == NULL ) 226 226 imcb_ask_add( bla->ic, bla->handle, NULL ); 227 227 … … 371 371 } 372 372 373 if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && find_buddy( ic, jid ) )373 if( bud == NULL && ( flags & GET_BUDDY_CREAT ) && imcb_find_buddy( ic, jid ) ) 374 374 { 375 375 *s = '/'; … … 391 391 if( bud == NULL ) 392 392 /* No match. Create it now? */ 393 return ( ( flags & GET_BUDDY_CREAT ) && find_buddy( ic, jid_ ) ) ?393 return ( ( flags & GET_BUDDY_CREAT ) && imcb_find_buddy( ic, jid_ ) ) ? 394 394 jabber_buddy_add( ic, jid_ ) : NULL; 395 395 else if( bud->resource && ( flags & GET_BUDDY_EXACT ) )
Note: See TracChangeset
for help on using the changeset viewer.