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/nogaim.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'protocols/nogaim.c') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index ff1c9a85..0a674b40 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -293,6 +293,17 @@ void imcb_connected( struct im_connection *ic ) function should be handled correctly. (IOW, ignored) */ if( ic->flags & OPT_LOGGED_IN ) return; + + if( ic->acc->flags & ACC_FLAG_LOCAL ) + { + GHashTableIter nicks; + gpointer k, v; + g_hash_table_iter_init( &nicks, ic->acc->nicks ); + while( g_hash_table_iter_next( &nicks, &k, &v ) ) + { + ic->acc->prpl->add_buddy( ic, (char*) k, NULL ); + } + } imcb_log( ic, "Logged in" ); -- cgit v1.2.3