snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit c8848f6e9f8e9fd9d17290b1ef301d3bf7beccb4
parent 6a233d5ba051f8018e819c0dcf5217aba66558a2
Author: grunfink <grunfink@comam.es>
Date:   Fri, 30 May 2025 19:59:40 +0200

More webhook checks.

Diffstat:
Mactivitypub.c | 2+-
Mdata.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/activitypub.c b/activitypub.c @@ -2769,7 +2769,7 @@ void process_user_queue_item(snac *user, xs_dict *q_item) if (strcmp(type, "notify_webhook") == 0) { const char *webhook = xs_dict_get(user->config, "notify_webhook"); - if (xs_is_string(webhook) && *webhook) { + if (xs_is_string(webhook) && xs_match(webhook, "https://*|http://*")) { /** **/ const xs_dict *msg = xs_dict_get(q_item, "message"); int retries = xs_number_get(xs_dict_get(q_item, "retries")); diff --git a/data.c b/data.c @@ -3529,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) && *webhook) { + if (xs_is_string(webhook) && xs_match(webhook, "https://*|http://*")) { /** **/ xs *msg = xs_dup(noti); /* add more data */