From 9d9ffb08cfb0c29aadc9b327b415bf551dde1dec Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 20 Nov 2014 00:32:33 +0000 Subject: [PATCH] Show roster after roster received --- src/server_events.c | 4 ++++ src/server_events.h | 1 + src/xmpp/roster.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/server_events.c b/src/server_events.c index ecc78915..335ecf2d 100644 --- a/src/server_events.c +++ b/src/server_events.c @@ -122,7 +122,11 @@ handle_login_account_success(char *account_name) log_info("%s logged in successfully", account->jid); account_free(account); +} +void +handle_roster_received(void) +{ if (prefs_get_boolean(PREF_ROSTER)) { ui_show_roster(); } diff --git a/src/server_events.h b/src/server_events.h index ec83a50c..e750ecf1 100644 --- a/src/server_events.h +++ b/src/server_events.h @@ -116,5 +116,6 @@ void handle_muc_occupant_online(const char * const room, const char * const nick const char * const show_str, const char * const status_str); void handle_roster_update(const char * const barejid, const char * const name, GSList *groups, const char * const subscription, gboolean pending_out); +void handle_roster_received(void); #endif diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index d269e995..f5439c46 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -325,6 +325,8 @@ _roster_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, item = xmpp_stanza_get_next(item); } + handle_roster_received(); + resource_presence_t conn_presence = accounts_get_login_presence(jabber_get_account_name()); presence_update(conn_presence, NULL, 0); }