1
0
grunfink 1 жил өмнө
parent
commit
c8848f6e9f
2 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 1 1
      activitypub.c
  2. 1 1
      data.c

+ 1 - 1
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"));
 

+ 1 - 1
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 */