about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-02-10 14:52:42 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-02-10 14:52:42 +0100
commitdd8086772d274542a28b7af045572933f0b6ac7d (patch)
treec9a8d895967ab68731ad01ac68e334ce1fc96c65 /src/xmpp
parentc2d70a071fb107a98f9b057eab4e5021f0eb7187 (diff)
downloadprofani-tty-dd8086772d274542a28b7af045572933f0b6ac7d.tar.gz
xep-0308: create setting to toggle lmc
and print settings if only `/correction` is run.
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/capabilities.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c
index ebccec24..a0fcecb0 100644
--- a/src/xmpp/capabilities.c
+++ b/src/xmpp/capabilities.c
@@ -104,14 +104,19 @@ caps_init(void)
     g_hash_table_add(prof_features, strdup(STANZA_NS_CHATSTATES));
     g_hash_table_add(prof_features, strdup(STANZA_NS_PING));
     g_hash_table_add(prof_features, strdup(STANZA_NS_STABLE_ID));
+
     if (prefs_get_boolean(PREF_RECEIPTS_SEND)) {
         g_hash_table_add(prof_features, strdup(STANZA_NS_RECEIPTS));
     }
+
     if (prefs_get_boolean(PREF_LASTACTIVITY)) {
         g_hash_table_add(prof_features, strdup(STANZA_NS_LASTACTIVITY));
     }
-    //TODO: depend on setting
-    g_hash_table_add(prof_features, strdup(STANZA_NS_LAST_MESSAGE_CORRECTION));
+
+    if (prefs_get_boolean(PREF_CORRECTION_ALLOW)) {
+        g_hash_table_add(prof_features, strdup(STANZA_NS_LAST_MESSAGE_CORRECTION));
+    }
+
     my_sha1 = NULL;
 }