Changeset fd65edb


Ignore:
Timestamp:
2010-12-05T00:30:07Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
a429907
Parents:
b41d5d2
Message:

When recreating the Twitter channel after the user left, also pre-populate
it with all contacts. Also, don't force-rejoin the user into the channel
on every poll, but only if there are new messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    rb41d5d2 rfd65edb  
    110110                        g_free(l->data);
    111111        g_slist_free(txl->list);
     112        g_free(txl);
    112113}
    113114
     
    270271
    271272        txl_free(txl);
    272         g_free(txl);
    273273}
    274274
     
    507507        struct groupchat *gc;
    508508        struct twitter_data *td = ic->proto_data;
     509        GSList *l;
    509510       
    510511        td->home_timeline_gc = gc = imcb_chat_new( ic, "home/timeline" );
     
    513514        imcb_chat_name_hint( gc, name_hint );
    514515        g_free( name_hint );
     516       
     517        for( l = ic->bee->users; l; l = l->next )
     518        {
     519                bee_user_t *bu = l->data;
     520                if( bu->ic == ic )
     521                        imcb_chat_add_buddy( td->home_timeline_gc, bu->handle );
     522        }
    515523}
    516524
     
    649657
    650658        // See if the user wants to see the messages in a groupchat window or as private messages.
    651         if (g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0)
     659        if (txl->list == NULL)
     660                ;
     661        else if (g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0)
    652662                twitter_groupchat(ic, txl->list);
    653663        else
     
    656666        // Free the structure. 
    657667        txl_free(txl);
    658         g_free(txl);
    659668}
    660669
     
    731740        // Free the structure.
    732741        txl_free(txl);
    733         g_free(txl);
    734742}
    735743
Note: See TracChangeset for help on using the changeset viewer.