From 8177ccea661f6c10f1046de4ad872ff16d420083 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 30 Nov 2023 13:15:39 +0100 Subject: [PATCH] little for apprise type urls that are converted ot post:// --- changedetectionio/notification.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index 7f08c1b3..3bbc7969 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -83,9 +83,13 @@ def apprise_custom_api_call_wrapper(body, title, notify_type, *args, **kwargs): headers = {URLBase.unquote(x): URLBase.unquote(y) for x, y in results['qsd+'].items()} - # Add our GET paramters in the event the user wants to pass these along - params = {URLBase.unquote(x): URLBase.unquote(y) - for x, y in results['qsd-'].items()} + # https://github.com/caronc/apprise/wiki/Notify_Custom_JSON#get-parameter-manipulation + # In Apprise, it relies on prefixing each request arg with "-", because it uses say &method=update as a flag for apprise + # but here we are making straight requests, so we need todo convert this against apprise's logic + for k, v in results['qsd'].items(): + if not k.strip('+-') in results['qsd+'].keys(): + params[URLBase.unquote(k)] = URLBase.unquote(v) + # Determine Authentication auth = ''