about summary refs log tree commit diff stats
path: root/src/jabber.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jabber.c')
-rw-r--r--src/jabber.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jabber.c b/src/jabber.c
index e2e146e8..8c9c9ba0 100644
--- a/src/jabber.c
+++ b/src/jabber.c
@@ -386,7 +386,11 @@ _roster_handler(xmpp_conn_t * const conn,
             const char *jid = xmpp_stanza_get_attribute(item, "jid");
             const char *name = xmpp_stanza_get_attribute(item, "name");
             const char *sub = xmpp_stanza_get_attribute(item, "subscription");
-            contact_list_add(jid, name, "offline", NULL, sub);
+            gboolean added = contact_list_add(jid, name, "offline", NULL, sub);
+
+            if (!added) {
+                log_warning("Attempt to add contact twice: %s", jid);
+            }
 
             item = xmpp_stanza_get_next(item);
         }