aboutsummaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2025-05-30 19:34:11 +0200
committergrunfink <grunfink@comam.es>2025-05-30 19:34:11 +0200
commitf055c8b694a398868d14fd70df61d02429846dae (patch)
treeed4cddbe23462d75fe05f7d0dcd3f2d5daf8961f /data.c
parente41e5974c7943f1eb02497051ce5e8d5c5b40aed (diff)
Added a new server knob disable_notify_webhook.
Diffstat (limited to 'data.c')
-rw-r--r--data.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/data.c b/data.c
index 10084f9..74bc112 100644
--- a/data.c
+++ b/data.c
@@ -3167,7 +3167,8 @@ void notify_add(snac *snac, const char *type, const char *utype,
pthread_mutex_unlock(&data_mutex);
}
- enqueue_notify_webhook(snac, noti, 0);
+ if (!xs_is_true(xs_dict_get(srv_config, "disable_notify_webhook")))
+ enqueue_notify_webhook(snac, noti, 0);
}
@@ -3528,7 +3529,7 @@ void enqueue_notify_webhook(snac *user, const xs_dict *noti, int retries)
{
const char *webhook = xs_dict_get(user->config, "notify_webhook");
- if (xs_is_string(webhook)) {
+ if (xs_is_string(webhook) && *webhook) {
xs *msg = xs_dup(noti);
/* add more data */