about summary refs log tree commit diff stats
path: root/src/ui/console.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-04-11 10:58:22 +0200
committerGitHub <noreply@github.com>2019-04-11 10:58:22 +0200
commit61df0c8e8513a1aa9912e37019a63778ec3ed06c (patch)
treea52850f2f5fc225759c2287d1672ed22b5ef7f0a /src/ui/console.c
parent6b064cfde4456c25bd9dbcbfe0a79262ebcb3599 (diff)
parentf75e1d7a7b05c68f03b6b13163ac9f2b8824e7df (diff)
downloadprofani-tty-61df0c8e8513a1aa9912e37019a63778ec3ed06c.tar.gz
Merge pull request #1039 from paulfariello/feature/omemo
Add basic OMEMO support.
Diffstat (limited to 'src/ui/console.c')
-rw-r--r--src/ui/console.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index e5c12158..260658c8 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -1999,6 +1999,28 @@ cons_show_pgp_prefs(void)
 }
 
 void
+cons_show_omemo_prefs(void)
+{
+    cons_show("OMEMO preferences:");
+    cons_show("");
+
+    char *log_value = prefs_get_string(PREF_OMEMO_LOG);
+    if (strcmp(log_value, "on") == 0) {
+        cons_show("OMEMO logging (/omemo log)   : ON");
+    } else if (strcmp(log_value, "off") == 0) {
+        cons_show("OMEMO logging (/omemo log)   : OFF");
+    } else {
+        cons_show("OMEMO logging (/omemo log)   : Redacted");
+    }
+    prefs_free_string(log_value);
+
+    char ch = prefs_get_omemo_char();
+    cons_show("OMEMO char (/omemo char)     : %c", ch);
+
+    cons_alert();
+}
+
+void
 cons_show_themes(GSList *themes)
 {
     cons_show("");
@@ -2072,6 +2094,8 @@ cons_prefs(void)
     cons_show("");
     cons_show_pgp_prefs();
     cons_show("");
+    cons_show_omemo_prefs();
+    cons_show("");
 
     cons_alert();
 }