From f1f3e3b11631f0075597ff93f7b4775f3403d48e Mon Sep 17 00:00:00 2001 From: default Date: Mon, 20 Feb 2023 06:00:54 +0100 Subject: Email notifications can be disabled. --- html.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'html.c') diff --git a/html.c b/html.c index 6eadbf7..386354d 100644 --- a/html.c +++ b/html.c @@ -327,9 +327,17 @@ d_char *html_top_controls(snac *snac, d_char *s) "\n" "\n"; - char *email = xs_dict_get(snac->config, "email"); - if (xs_is_null(email)) - email = ""; + const char *email = "[disabled by admin]"; + + if (xs_type(xs_dict_get(srv_config, "disable_email_notifications")) != XSTYPE_TRUE) { + email = xs_dict_get(snac->config_o, "email"); + if (xs_is_null(email)) { + email = xs_dict_get(snac->config, "email"); + + if (xs_is_null(email)) + email = ""; + } + } char *cw = xs_dict_get(snac->config, "cw"); if (xs_is_null(cw)) -- cgit v1.2.3