about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorSteffen Jaeckel <jaeckel-floss@eyet-services.de>2022-12-05 10:25:57 +0100
committerSteffen Jaeckel <jaeckel-floss@eyet-services.de>2023-01-18 17:04:41 +0100
commitb1b6c6f62d69fb366fb347cb7e78a7791107f456 (patch)
treed4b0ba74382bfef1c2f4c35f20500a1e8e8551f2 /src/ui
parent78496d6226cb6f00ba3b14db479497ab3cfc8160 (diff)
downloadprofani-tty-b1b6c6f62d69fb366fb347cb7e78a7791107f456.tar.gz
add `/strophe` command to modify libstrophe-specific settings
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c16
-rw-r--r--src/ui/ui.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 5937a42a..b1720415 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -2311,6 +2311,7 @@ cons_show_connection_prefs(void)
     cons_autoping_setting();
     cons_autoconnect_setting();
     cons_rooms_cache_setting();
+    cons_strophe_setting();
 
     cons_alert(NULL);
 }
@@ -2994,3 +2995,18 @@ cons_mood_setting(void)
         cons_show("Display user mood (/mood)                 : OFF");
     }
 }
+
+void
+cons_strophe_setting(void)
+{
+    const char* sm_setting = "OFF";
+    if (prefs_get_boolean(PREF_STROPHE_SM_ENABLED)) {
+        if (prefs_get_boolean(PREF_STROPHE_SM_RESEND)) {
+            sm_setting = "ON";
+        } else {
+            sm_setting = "NO-RESEND";
+        }
+    }
+    cons_show("XEP-0198 Stream-Management                : %s", sm_setting);
+    cons_show("libstrophe Verbosity                      : %s", prefs_get_string(PREF_STROPHE_VERBOSITY));
+}
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 94d1c716..d9534ed5 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -341,6 +341,7 @@ void cons_slashguard_setting(void);
 void cons_mam_setting(void);
 void cons_silence_setting(void);
 void cons_mood_setting(void);
+void cons_strophe_setting(void);
 void cons_show_contact_online(PContact contact, Resource* resource, GDateTime* last_activity);
 void cons_show_contact_offline(PContact contact, char* resource, char* status);
 void cons_theme_properties(void);