diff options
| author | grunfink <grunfink@comam.es> | 2026-06-02 09:19:38 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2026-06-02 09:19:38 +0200 |
| commit | 41fea226322ca945ffec574a2f69d0b6adb63ff2 (patch) | |
| tree | d1c6dead108be762e1b2d07ce229b86f7bd118ce | |
| parent | 1adf45de30921ae727af2dd1302615e33e8181ba (diff) | |
New user directive: 'excluded_langs'.
| -rw-r--r-- | html.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2339,6 +2339,17 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, int c = 0; xs_dict_next(cmap, &lang, &dummy, &c); + + if (user && xs_is_string(lang)) { + /* discard posts in excluded languages */ + const char *excluded_langs = xs_dict_get(user->config, "excluded_langs"); + + if (xs_is_string(excluded_langs) && + xs_str_in(excluded_langs, lang) != -1) { + snac_debug(user, 1, xs_fmt("excluded post in language '%s'", lang)); + return NULL; + } + } } if (strcmp(type, "Follow") == 0) { |