aboutsummaryrefslogtreecommitdiffstats
path: root/src/config
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/config
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/config')
-rw-r--r--src/config/preferences.c3
-rw-r--r--src/config/preferences.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 3e1ba585..4b24d46b 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -1916,6 +1916,7 @@ _get_group(preference_t pref)
case PREF_TLS_CERTPATH:
case PREF_CORRECTION_ALLOW:
case PREF_MAM:
+ case PREF_SILENCE_NON_ROSTER:
return PREF_GROUP_CONNECTION;
case PREF_OTR_LOG:
case PREF_OTR_POLICY:
@@ -2198,6 +2199,8 @@ _get_key(preference_t pref)
return "url.save.cmd";
case PREF_COMPOSE_EDITOR:
return "compose.editor";
+ case PREF_SILENCE_NON_ROSTER:
+ return "silence.incoming.nonroster";
default:
return NULL;
}
diff --git a/src/config/preferences.h b/src/config/preferences.h
index d8573349..f7474c1f 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -176,6 +176,7 @@ typedef enum {
PREF_URL_OPEN_CMD,
PREF_URL_SAVE_CMD,
PREF_COMPOSE_EDITOR,
+ PREF_SILENCE_NON_ROSTER,
} preference_t;
typedef struct prof_alias_t