From ace44d0e009ab7a0f13e1c81c001071bb4f7ab43 Mon Sep 17 00:00:00 2001 From: Brandon Wees Date: Thu, 14 Jul 2022 11:41:12 -0400 Subject: [PATCH] Notifications fix - Discord - added discord webhook base url to truncation rules (#753) Co-authored-by: bwees --- changedetectionio/notification.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index 5448284f..de8d4cad 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -79,7 +79,7 @@ def process_notification(n_object, datastore): n_title = n_title[0:payload_max_size] n_body = n_body[0:body_limit] - elif url.startswith('discord://'): + elif url.startswith('discord://') or url.startswith('https://discordapp.com/api/webhooks'): # real limit is 2000, but minus some for extra metadata payload_max_size = 1700 body_limit = max(0, payload_max_size - len(n_title))