commit c8848f6

grunfink  ·  2025-05-30 17:59:40 +0000 UTC
parent 6a233d5
More webhook checks.
2 files changed,  +2, -2
M data.c
+1, -1
1@@ -2769,7 +2769,7 @@ void process_user_queue_item(snac *user, xs_dict *q_item)
2     if (strcmp(type, "notify_webhook") == 0) {
3         const char *webhook = xs_dict_get(user->config, "notify_webhook");
4 
5-        if (xs_is_string(webhook) && *webhook) {
6+        if (xs_is_string(webhook) && xs_match(webhook, "https://*|http://*")) { /** **/
7             const xs_dict *msg = xs_dict_get(q_item, "message");
8             int retries = xs_number_get(xs_dict_get(q_item, "retries"));
9 
M data.c
+1, -1
1@@ -3529,7 +3529,7 @@ void enqueue_notify_webhook(snac *user, const xs_dict *noti, int retries)
2 {
3     const char *webhook = xs_dict_get(user->config, "notify_webhook");
4 
5-    if (xs_is_string(webhook) && *webhook) {
6+    if (xs_is_string(webhook) && xs_match(webhook, "https://*|http://*")) { /** **/
7         xs *msg = xs_dup(noti);
8 
9         /* add more data */