about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-08-18 00:29:33 +0100
committerJames Booth <boothj5@gmail.com>2016-08-18 00:29:33 +0100
commit71dcb2e427ec3e7e15f2131f18d64b84fc6230f8 (patch)
tree15cd74ed0c6051ab944fd786ab7538e22643d1f8 /src/xmpp
parent4de570b1ee34bad2e7565df6a426e497485a5708 (diff)
downloadprofani-tty-71dcb2e427ec3e7e15f2131f18d64b84fc6230f8.tar.gz
Only include lastactivity feature in disco responses when enabled
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/capabilities.c5
-rw-r--r--src/xmpp/xmpp.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c
index 17d60e36..6ca3a29e 100644
--- a/src/xmpp/capabilities.c
+++ b/src/xmpp/capabilities.c
@@ -105,8 +105,9 @@ caps_init(void)
     if (prefs_get_boolean(PREF_RECEIPTS_SEND)) {
         g_hash_table_add(prof_features, strdup(STANZA_NS_RECEIPTS));
     }
-    g_hash_table_add(prof_features, strdup(STANZA_NS_LASTACTIVITY));
-
+    if (prefs_get_boolean(PREF_LASTACTIVITY)) {
+        g_hash_table_add(prof_features, strdup(STANZA_NS_LASTACTIVITY));
+    }
     my_sha1 = NULL;
 }
 
diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h
index 821abfd6..80245b2d 100644
--- a/src/xmpp/xmpp.h
+++ b/src/xmpp/xmpp.h
@@ -57,6 +57,7 @@
 
 #define XMPP_FEATURE_BLOCKING "urn:xmpp:blocking"
 #define XMPP_FEATURE_RECEIPTS "urn:xmpp:receipts"
+#define XMPP_FEATURE_LASTACTIVITY "jabber:iq:last"
 
 typedef enum {
     JABBER_CONNECTING,