From 65022b3c2f437b118c92622aff5115bcf4568323 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 4 Oct 2012 21:31:09 +0100 Subject: [PATCH] Users added to contact list when no precense notification The user is added from the roster --- src/jabber.c | 1 + src/profanity.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/jabber.c b/src/jabber.c index b51d5f68..da606132 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -301,6 +301,7 @@ _connection_handler(xmpp_conn_t * const conn, jabber_conn.conn_status = JABBER_CONNECTED; jabber_conn.presence = PRESENCE_ONLINE; + jabber_roster_request(); } else { // received close stream response from server after disconnect diff --git a/src/profanity.c b/src/profanity.c index 4d7bc397..f57b0ca9 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -176,6 +176,11 @@ prof_handle_roster(GSList *roster) } else { cons_show("%s", entry->jid); } + + // if contact not in contact list add them as offline + if (find_contact(entry->jid) == NULL) { + contact_list_add(entry->jid, "offline", NULL); + } roster = g_slist_next(roster);