about summary refs log tree commit diff stats
path: root/src/otr/otr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/otr/otr.c')
-rw-r--r--src/otr/otr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/otr/otr.c b/src/otr/otr.c
index 878f2edd..d898e740 100644
--- a/src/otr/otr.c
+++ b/src/otr/otr.c
@@ -84,9 +84,13 @@ cb_policy(void *opdata, ConnContext *context)
 }
 
 static int
-cb_is_logged_in(void *opdata, const char *accountname,
-    const char *protocol, const char *recipient)
+cb_is_logged_in(void *opdata, const char *accountname, const char *protocol, const char *recipient)
 {
+    jabber_conn_status_t conn_status = jabber_get_connection_status();
+    if (conn_status != JABBER_CONNECTED) {
+        return PRESENCE_OFFLINE;
+    }
+
     PContact contact = roster_get_contact(recipient);
 
     // not in roster