Ignore:
Timestamp:
2010-08-07T21:06:24Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
b890626
Parents:
7b87539
Message:

Allow protocol modules to keep per-contact protocol-specific data. Use
this in the Twitter module to remember the id and timestamp of a contact's
last tweet, which can later be used for simple replies/retweets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    r7b87539 r203a2d2  
    395395//}
    396396
     397static void twitter_buddy_data_add( struct bee_user *bu )
     398{
     399        bu->data = g_new0( struct twitter_user_data, 1 );
     400}
     401
     402static void twitter_buddy_data_free( struct bee_user *bu )
     403{
     404        g_free( bu->data );
     405}
     406
    397407static void twitter_handle_command( struct im_connection *ic, char *message )
    398408{
     
    408418                return;
    409419        }
    410         else if( !set_getbool( &ic->set, "commands" ) )
     420        else if( !set_getbool( &ic->acc->set, "commands" ) )
    411421        {
    412422                /* Not supporting commands. */
     
    491501        ret->rem_deny = twitter_rem_deny;
    492502        ret->send_typing = twitter_send_typing;
     503        ret->buddy_data_add = twitter_buddy_data_add;
     504        ret->buddy_data_free = twitter_buddy_data_free;
    493505        ret->handle_cmp = g_strcasecmp;
    494506       
Note: See TracChangeset for help on using the changeset viewer.