aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--protocols/twitter/twitter.c1
-rw-r--r--protocols/twitter/twitter_lib.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index 8502cd6f..5027eb74 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -33,6 +33,7 @@
gboolean twitter_main_loop(gpointer data, gint fd, b_input_condition cond)
{
struct im_connection *ic = data;
+
// Check if we are still logged in...
// We are logged in if the flag says so and the connection is still in the connections list.
if (!g_slist_find( twitter_connections, ic ) ||
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index 93f71f3b..e297f6b2 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -97,7 +97,7 @@ static void txl_free(struct twitter_xml_list *txl)
/**
* Add a buddy if it is not allready added, set the status to logged in.
*/
-static void twitter_add_buddy(struct im_connection *ic, char *name)
+static void twitter_add_buddy(struct im_connection *ic, char *name, const char *fullname)
{
struct twitter_data *td = ic->proto_data;
@@ -106,6 +106,7 @@ static void twitter_add_buddy(struct im_connection *ic, char *name)
{
// The buddy is not in the list, add the buddy and set the status to logged in.
imcb_add_buddy( ic, name, NULL );
+ imcb_rename_buddy( ic, name, fullname );
if (set_getbool( &ic->acc->set, "use_groupchat" ))
imcb_chat_add_buddy( td->home_timeline_gc, name );
else
@@ -421,7 +422,7 @@ static void twitter_groupchat(struct im_connection *ic, GSList *list)
for ( l = list; l ; l = g_slist_next(l) )
{
status = l->data;
- twitter_add_buddy(ic, status->user->screen_name);
+ twitter_add_buddy(ic, status->user->screen_name, status->user->name);
// Say it!
if (g_strcasecmp(td->user, status->user->screen_name) == 0)
@@ -536,7 +537,7 @@ static void twitter_http_get_statuses_friends(struct http_request *req)
for ( l = txl->list; l ; l = g_slist_next(l) )
{
user = l->data;
- twitter_add_buddy(ic, user->screen_name);
+ twitter_add_buddy(ic, user->screen_name, user->name);
}
// if the next_cursor is set to something bigger then 0 there are more friends to gather.