Changeset 3a80471 for protocols


Ignore:
Timestamp:
2007-11-24T01:13:15Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
608f8cf
Parents:
77bfd07
Message:

(Hopefully) fixing one case where the Jabber module doesn't understand a
<presence type=unavailable> tag properly and keeps showing the buddy as
on-line. (When the tag comes from a bare JID.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/presence.c

    r77bfd07 r3a80471  
    8888        else if( strcmp( type, "unavailable" ) == 0 )
    8989        {
    90                 if( ( bud = jabber_buddy_by_jid( ic, from, GET_BUDDY_EXACT ) ) == NULL )
     90                if( ( bud = jabber_buddy_by_jid( ic, from, 0 ) ) == NULL )
    9191                {
    9292                        if( set_getbool( &ic->irc->set, "debug" ) )
     
    101101                }
    102102               
    103                 jabber_buddy_remove( ic, from );
     103                if( strchr( from, '/' ) == NULL )
     104                        /* Sometimes servers send a type="unavailable" from a
     105                           bare JID, which should mean that suddenly all
     106                           resources for this JID disappeared. */
     107                        jabber_buddy_remove_bare( ic, from );
     108                else
     109                        jabber_buddy_remove( ic, from );
    104110               
    105111                if( is_chat )
Note: See TracChangeset for help on using the changeset viewer.