Ignore:
Timestamp:
2006-10-15T20:24:01Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d74c644
Parents:
e617b35
Message:

Proper cleanup of jabber buddy structures when removing a buddy from the
list, proper checking (and handling) of events related to buddies that
aren't "hashed" yet, limit checks on priorityto setting, renamed JEP85
to XEP85, support for more XEP85 states.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    re617b35 r788a1af  
    147147       
    148148        node = xt_new_node( "body", message, NULL );
    149         node = jabber_make_packet( "message", "chat", bud->full_jid, node );
    150        
    151         if( ( jd->flags & JFLAG_WANT_TYPING ) &&
    152             ( ( bud->flags & JBFLAG_DOES_JEP85 ) ||
    153              !( bud->flags & JBFLAG_PROBED_JEP85 ) ) )
     149        node = jabber_make_packet( "message", "chat", bud ? bud->full_jid : who, node );
     150       
     151        if( ( jd->flags & JFLAG_WANT_TYPING ) && bud &&
     152            ( ( bud->flags & JBFLAG_DOES_XEP85 ) ||
     153             !( bud->flags & JBFLAG_PROBED_XEP85 ) ) )
    154154        {
    155155                struct xt_node *act;
    156156               
    157157                /* If the user likes typing notification and if we don't know
    158                    (and didn't probe before) if this resource supports JEP85,
     158                   (and didn't probe before) if this resource supports XEP85,
    159159                   include a probe in this packet now. */
    160160                act = xt_new_node( "active", NULL, NULL );
     
    163163               
    164164                /* Just make sure we do this only once. */
    165                 bud->flags |= JBFLAG_PROBED_JEP85;
     165                bud->flags |= JBFLAG_PROBED_XEP85;
    166166        }
    167167       
     
    226226static void jabber_remove_buddy( struct gaim_connection *gc, char *who, char *group )
    227227{
     228        /* We should always do this part. Clean up our administration a little bit. */
     229        jabber_buddy_remove_bare( gc, who );
     230       
    228231        if( jabber_remove_from_roster( gc, who ) )
    229232                presence_send_request( gc, who, "unsubscribe" );
     
    248251        jd->flags |= JFLAG_WANT_TYPING;
    249252       
    250         bud = jabber_buddy_by_jid( gc, who );
    251         if( bud->flags & JBFLAG_DOES_JEP85 )
     253        if( ( bud = jabber_buddy_by_jid( gc, who ) ) == NULL )
     254        {
     255                /* Sending typing notifications to unknown buddies is
     256                   unsupported for now. Shouldn't be a problem, I think. */
     257                return 0;
     258        }
     259       
     260        if( bud->flags & JBFLAG_DOES_XEP85 )
    252261        {
    253262                /* We're only allowed to send this stuff if we know the other
Note: See TracChangeset for help on using the changeset viewer.