about summary refs log tree commit diff stats
path: root/src/ui/console.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-07-01 18:02:03 +0200
committerMichael Vetter <jubalh@iodoru.org>2021-07-01 18:02:03 +0200
commit06482fdaefc2ae8651bcdd719936cb9c7bcfb10f (patch)
tree3b2e577ff352dadaf8827539b64e60b039a560e0 /src/ui/console.c
parent226cffe75be5d408e1d357337eb4ed921100f3b7 (diff)
downloadprofani-tty-06482fdaefc2ae8651bcdd719936cb9c7bcfb10f.tar.gz
Add option to only allow messages from jids in roster
`/silence on` will throw away all messages (type: chat, normal) that
come from jids that are not in the roster.

Implement https://github.com/profanity-im/profanity/issues/955
Diffstat (limited to 'src/ui/console.c')
-rw-r--r--src/ui/console.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 4cb041a8..f7963a27 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -2179,6 +2179,16 @@ cons_mam_setting(void)
 }
 
 void
+cons_silence_setting(void)
+{
+    if (prefs_get_boolean(PREF_SILENCE_NON_ROSTER)) {
+        cons_show("Block all messages from JIDs that are not in the roster (/silence)    : ON");
+    } else {
+        cons_show("Block all messages from JIDs that are not in the roster (/silence)    : OFF");
+    }
+}
+
+void
 cons_show_connection_prefs(void)
 {
     cons_show("Connection preferences:");