aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/twitter/twitter.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/twitter/twitter.c')
-rw-r--r--protocols/twitter/twitter.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index c1f54681..468f9eaa 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -350,6 +350,7 @@ void twitter_login_finish(struct im_connection *ic)
} else if (!(td->flags & TWITTER_MODE_ONE) &&
!(td->flags & TWITTER_HAVE_FRIENDS)) {
imcb_log(ic, "Getting contact list");
+
twitter_get_friends_ids(ic, -1);
twitter_get_mutes_ids(ic, -1);
twitter_get_blocks_ids(ic, -1);
@@ -711,6 +712,10 @@ static void twitter_login(account_t * acc)
td->flags |= TWITTER_MODE_CHAT;
}
+ td->mutes_ids = g_hash_table_new_full(g_str_hash, (GEqualFunc)strcmp, (GDestroyNotify)g_free, NULL);
+ td->blocks_ids = g_hash_table_new_full(g_str_hash, (GEqualFunc)strcmp, (GDestroyNotify)g_free, NULL);
+ td->noretweets_ids = g_hash_table_new_full(g_str_hash, (GEqualFunc)strcmp, (GDestroyNotify)g_free, NULL);
+
twitter_login_finish(ic);
}
@@ -736,14 +741,9 @@ static void twitter_logout(struct im_connection *ic)
b_event_remove(td->filter_update_id);
}
- g_slist_foreach(td->mutes_ids, (GFunc) g_free, NULL);
- g_slist_free(td->mutes_ids);
-
- g_slist_foreach(td->blocks_ids, (GFunc) g_free, NULL);
- g_slist_free(td->blocks_ids);
-
- g_slist_foreach(td->noretweets_ids, (GFunc) g_free, NULL);
- g_slist_free(td->noretweets_ids);
+ g_hash_table_unref(td->mutes_ids);
+ g_hash_table_unref(td->blocks_ids);
+ g_hash_table_unref(td->noretweets_ids);
http_close(td->stream);
twitter_filter_remove_all(ic);