Ignore:
Timestamp:
2009-11-28T00:47:20Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
5674207
Parents:
487f555
Message:

Look up a buddy in the contact list on incoming msgs. This seems to be
the best way to "normalize" handles (i.e. chopping off the resource part
of JIDs).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    r487f555 r3e7b640  
    380380static void prplcb_blist_remove( PurpleBuddyList *list, PurpleBlistNode *node )
    381381{
     382        /*
    382383        PurpleBuddy *bud = (PurpleBuddy*) node;
    383384       
    384         /*
    385385        if( node->type == PURPLE_BLIST_BUDDY_NODE )
    386386        {
     
    407407{
    408408        struct im_connection *ic = purple_ic_by_pa( conv->account );
     409        PurpleBuddy *buddy;
    409410       
    410411        /* ..._SEND means it's an outgoing message, no need to echo those. */
    411         if( !( flags & PURPLE_MESSAGE_SEND ) )
    412                 imcb_buddy_msg( ic, (char*) who, (char*) message, 0, mtime );
     412        if( flags & PURPLE_MESSAGE_SEND )
     413                return;
     414       
     415        buddy = purple_find_buddy( conv->account, who );
     416        if( buddy != NULL )
     417                who = purple_buddy_get_contact_alias( buddy );
     418       
     419        imcb_buddy_msg( ic, (char*) who, (char*) message, 0, mtime );
    413420}
    414421
Note: See TracChangeset for help on using the changeset viewer.