From 9f4364a130186c643ab5e821a7dc1401fc42c633 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 28 Jul 2022 12:34:55 +0200 Subject: [PATCH] Add https://discord.com/api notification hook to the automatic truncation due to Discords 2000 char limit --- changedetectionio/notification.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index b0def158..ba27c94a 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -78,7 +78,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://') or url.startswith('https://discordapp.com/api/webhooks'): + elif url.startswith('discord://') or url.startswith('https://discordapp.com/api/webhooks') or url.startswith('https://discord.com/api'): # real limit is 2000, but minus some for extra metadata payload_max_size = 1700 body_limit = max(0, payload_max_size - len(n_title))