From 11e782892c33d6ecae949bc610c075107c0cda89 Mon Sep 17 00:00:00 2001 From: dequis Date: Fri, 23 Jan 2015 03:29:00 -0300 Subject: Fix whatsapp local contact lists Had to move the code that adds contacts to imcb_connected to avoid dereferencing a null im_connection. Turns out this kind of local contact lists only applies to renamed contacts, though. It doesn't deal with libpurple's blist.xml at all (it could, there are APIs for it since 2.6.0) --- protocols/account.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'protocols/account.c') diff --git a/protocols/account.c b/protocols/account.c index 188e362e..234b9de2 100644 --- a/protocols/account.c +++ b/protocols/account.c @@ -28,7 +28,7 @@ #include "account.h" static const char* account_protocols_local[] = { - "gg", NULL + "gg", "whatsapp", NULL }; static char *set_eval_nick_source( set_t *set, char *value ); @@ -350,9 +350,6 @@ static gboolean account_on_timeout( gpointer d, gint fd, b_input_condition cond void account_on( bee_t *bee, account_t *a ) { - GHashTableIter nicks; - gpointer k, v; - if( a->ic ) { /* Trying to enable an already-enabled account */ @@ -366,15 +363,6 @@ void account_on( bee_t *bee, account_t *a ) if( a->ic && !( a->ic->flags & ( OPT_SLOW_LOGIN | OPT_LOGGED_IN ) ) ) a->ic->keepalive = b_timeout_add( 120000, account_on_timeout, a->ic ); - - if( a->flags & ACC_FLAG_LOCAL ) - { - g_hash_table_iter_init(&nicks, a->nicks); - while( g_hash_table_iter_next( &nicks, &k, &v ) ) - { - a->prpl->add_buddy( a->ic, (char*) k, NULL ); - } - } } void account_off( bee_t *bee, account_t *a ) -- cgit v1.2.3