From 056a4517fea66332e7e367633d3ba30641ab41fd Mon Sep 17 00:00:00 2001 From: Ron Date: Tue, 29 Jul 2025 14:25:13 +0200 Subject: [PATCH 1/6] SIGNL4 Plugin Added SIGNL4 plugin added. --- apprise/plugins/signl4.py | 320 ++++++++++++++++++++++++++++++++++++ tests/test_plugin_signl4.py | 163 ++++++++++++++++++ 2 files changed, 483 insertions(+) create mode 100644 apprise/plugins/signl4.py create mode 100644 tests/test_plugin_signl4.py diff --git a/apprise/plugins/signl4.py b/apprise/plugins/signl4.py new file mode 100644 index 00000000..cc3047ee --- /dev/null +++ b/apprise/plugins/signl4.py @@ -0,0 +1,320 @@ +# -*- coding: utf-8 -*- +# BSD 2-Clause License +# +# Apprise - Push Notification Library. +# Copyright (c) 2025, Chris Caron +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# API Refererence: +# - https://docs.signl4.com/integrations/webhook/webhook.html +# + +import requests +from json import dumps + +from .base import NotifyBase +from ..url import PrivacyMode +from ..common import NotifyType +from ..utils.parse import validate_regex +from ..locale import gettext_lazy as _ + +class NotifySIGNL4(NotifyBase): + """ + A wrapper for SIGNL4 Notifications + """ + + # The default descriptive name associated with the Notification + service_name = "SIGNL4" + + # The services URL + service_url = "https://connect.signl4.com/webhook/" + + # Secure Protocol + secure_protocol = "signl4" + + # A URL that takes you to the setup/help of the specific protocol + setup_url = "https://github.com/caronc/apprise/wiki/Notify_signl4" + + # Our event action type + event_action = "trigger" + + # Define object templates + templates = ( + "{schema}://{secret}", + ) + + # Define our template tokens + template_tokens = dict(NotifyBase.template_tokens, **{ + # SIGNL4 team or integration secret + "secret": { + "name": _("Secret"), + "type": "string", + "private": True, + "required": True + }, + }) + + # Define our template arguments + template_args = dict(NotifyBase.template_args, **{ + "service": { + "name": _("service"), + "type": "string", + }, + "location": { + "name": _("location"), + "type": "string", + }, + "alerting_scenario": { + "name": _("alerting_scenario"), + "type": "string", + }, + "filtering": { + "name": _("filtering"), + "type": "bool", + }, + "external_id": { + "name": _("external_id"), + "type": "string", + }, + "status": { + "name": _("status"), + "type": "string", + }, + }) + + def __init__(self, secret, service=None, location=None, alerting_scenario=None, + filtering=None, external_id=None, status=None, **kwargs): + """ + Initialize SIGNL4 Object + """ + super().__init__(**kwargs) + + # SIGNL4 team or integration secret + self.secret = validate_regex(secret) + if not self.secret: + msg = "An invalid SIGNL4 team or integration secret " \ + "({}) was specified.".format(secret) + self.logger.warning(msg) + raise TypeError(msg) + + # A service option for notifications + self.service = service + + # A location option for notifications + self.location = location + + # A alerting_scenario option for notifications + self.alerting_scenario = alerting_scenario + + # A filtering option for notifications + self.filtering = bool(filtering) + + # A external_id option for notifications + self.external_id = external_id + + # A location option for notifications + self.status = status + + return + + def send(self, body, title="", notify_type=NotifyType.INFO, **kwargs): + """ + Send our SIGNL4 Notification + """ + + # Prepare our headers + headers = { + "Content-Type": "application/json", + } + + # Prepare our persistent_notification.create payload + payload = { + "title": title if title else self.app_desc, + "body": body, + "X-S4-SourceSystem": "Apprise", + } + + if self.service: + payload["X-S4-Service"] = self.service + + if self.alerting_scenario: + payload["X-S4-AlertingScenario"] = self.alerting_scenario + + if self.location: + payload["X-S4-Location"] = self.location + + if self.filtering: + payload["X-S4-Filtering"] = self.filtering + + if self.external_id: + payload["X-S4-ExternalID"] = self.external_id + + if self.status: + payload["X-S4-Status"] = self.status + + # Prepare our URL + notify_url = self.service_url + self.secret + + self.logger.debug("SIGNL4 POST URL: %s (cert_verify=%r)" % ( + notify_url, self.verify_certificate, + )) + self.logger.debug("SIGNL4 Payload: %s" % str(payload)) + + # Always call throttle before any remote server i/o is made + self.throttle() + + try: + r = requests.post( + notify_url, + data=dumps(payload), + headers=headers, + verify=self.verify_certificate, + timeout=self.request_timeout, + ) + if r.status_code not in ( + requests.codes.ok, requests.codes.created, + requests.codes.accepted): + # We had a problem + status_str = \ + NotifySIGNL4.http_response_code_lookup( + r.status_code) + + self.logger.warning( + "Failed to send SIGNL4 notification: " + "{}{}error={}.".format( + status_str, + ", " if status_str else "", + r.status_code)) + + self.logger.debug("Response Details:\r\n{}".format(r.content)) + + # Return; we're done + return False + + else: + self.logger.info("Sent SIGNL4 notification.") + + except requests.RequestException as e: + self.logger.warning( + "A Connection error occurred sending SIGNL4 " + "notification to %s." % self.host) + self.logger.debug("Socket Exception: %s" % str(e)) + + # Return; we're done + return False + + return True + + @property + def url_identifier(self): + """ + Returns all of the identifiers that make this URL unique from + another simliar one. Targets or end points should never be identified + here. + """ + return ( + self.secure_protocol, self.secret, + ) + + def url(self, privacy=False, *args, **kwargs): + """ + Returns the URL built dynamically based on specified arguments. + """ + + # Define any URL parameters + params = { + "region": "none", + } + + if self.service is not None: + params["service"] = self.service + + if self.location is not None: + params["location"] = self.location + + if self.alerting_scenario is not None: + params["alerting_scenario"] = self.alerting_scenario + + if self.filtering is not None: + params["filtering"] = self.filtering + + if self.external_id is not None: + params["external_id"] = self.external_id + + if self.status is not None: + params["status"] = self.status + + # Extend our parameters + params.update(self.url_parameters(privacy=privacy, *args, **kwargs)) + + url = "{schema}://{secret}/" + + return url.format( + schema=self.secure_protocol, + # never encode hostname since we're expecting it to be a valid one + secret=self.pprint( + self.secret, privacy, mode=PrivacyMode.Secret, safe=""), + params=NotifySIGNL4.urlencode(params), + ) + + @staticmethod + def parse_url(url): + """ + Parses the URL and returns enough arguments that can allow + us to re-instantiate this object. + """ + + results = NotifyBase.parse_url(url, verify_host=False) + if not results: + # We're done early as we couldn"t load the results + return results + + # The "secret" makes it easier to use yaml configuration + if "secret" in results["qsd"] and \ + len(results["qsd"]["secret"]): + results["secret"] = \ + NotifySIGNL4.unquote(results["qsd"]["secret"]) + else: + results["secret"] = \ + NotifySIGNL4.unquote(results["host"]) + + if "service" in results["qsd"] and len(results["qsd"]["service"]): + results["service"] = NotifySIGNL4.unquote(results["qsd"]["service"]) + + if "location" in results["qsd"] and len(results["qsd"]["location"]): + results["location"] = NotifySIGNL4.unquote(results["qsd"]["location"]) + + if "alerting_scenario" in results["qsd"] and len(results["qsd"]["alerting_scenario"]): + results["alerting_scenario"] = NotifySIGNL4.unquote(results["qsd"]["alerting_scenario"]) + + if "filtering" in results["qsd"] and len(results["qsd"]["filtering"]): + results["filtering"] = NotifySIGNL4.unquote(results["qsd"]["filtering"]) + + if "external_id" in results["qsd"] and len(results["qsd"]["external_id"]): + results["external_id"] = NotifySIGNL4.unquote(results["qsd"]["external_id"]) + + if "status" in results["qsd"] and len(results["qsd"]["status"]): + results["status"] = NotifySIGNL4.unquote(results["qsd"]["status"]) + + return results diff --git a/tests/test_plugin_signl4.py b/tests/test_plugin_signl4.py new file mode 100644 index 00000000..676f549a --- /dev/null +++ b/tests/test_plugin_signl4.py @@ -0,0 +1,163 @@ +# BSD 2-Clause License +# +# Apprise - Push Notification Library. +# Copyright (c) 2025, Chris Caron +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE.# BSD 2-Clause License +# +# Apprise - Push Notification Library. +# Copyright (c) 2025, Chris Caron +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +from json import dumps + +# Disable logging for a cleaner testing output +import logging +from unittest import mock + +from helpers import AppriseURLTester +import requests + +import apprise +from apprise.plugins.signl4 import ( + NotifySIGNL4, + NotifyType, +) + +logging.disable(logging.CRITICAL) + +SIGNL4_GOOD_RESPONSE = dumps({ + "eventId": "2516485120936941747_76d5cf30-27d2-4529-84ed-f31a8f2c72b1", +}) + +# Our Testing URLs +apprise_url_tests = ( + ( + "signl4://", + { + # We failed to identify any valid authentication + "instance": TypeError, + }, + ), + ( + "signl4://:@/", + { + # We failed to identify any valid authentication + "instance": TypeError, + }, + ), + ( + "signl4://%20%20/", + { + # invalid secret specified + "instance": TypeError, + }, + ), + ( + "signl4://secret/", + { + # No targets specified; this is allowed + "instance": NotifySIGNL4, + "notify_type": NotifyType.FAILURE, + # Our response expected server response + "requests_response_text": SIGNL4_GOOD_RESPONSE, + }, + ), + ( + "signl4://secret/?service=IoT", + { + # European Region + "instance": NotifySIGNL4, + "notify_type": NotifyType.FAILURE, + # Our response expected server response + "requests_response_text": SIGNL4_GOOD_RESPONSE, + }, + ), + ( + "signl4://secret/?location=40.6413111,-73.7781391", + { + # European Region + "instance": NotifySIGNL4, + "notify_type": NotifyType.FAILURE, + # Our response expected server response + "requests_response_text": SIGNL4_GOOD_RESPONSE, + }, + ), + ( + "signl4://secret/?alerting_scenario=singl4_ack", + { + # European Region + "instance": NotifySIGNL4, + "notify_type": NotifyType.FAILURE, + # Our response expected server response + "requests_response_text": SIGNL4_GOOD_RESPONSE, + }, + ), + ( + "signl4://secret/?filtering=False", + { + # European Region + "instance": NotifySIGNL4, + "notify_type": NotifyType.FAILURE, + # Our response expected server response + "requests_response_text": SIGNL4_GOOD_RESPONSE, + }, + ), + ( + "signl4://secret/?external_id=ar1234&status=new", + { + # European Region + "instance": NotifySIGNL4, + "notify_type": NotifyType.FAILURE, + # Our response expected server response + "requests_response_text": SIGNL4_GOOD_RESPONSE, + }, + ), +) + +def test_plugin_signl4_urls(): + """NotifySIGNL4() Apprise URLs.""" + + # Run our general tests + AppriseURLTester(tests=apprise_url_tests).run_all() From fd3c1fa5997d75552732f8d39ceb5878a90a2e4d Mon Sep 17 00:00:00 2001 From: Ron Date: Tue, 29 Jul 2025 14:49:34 +0200 Subject: [PATCH 2/6] Update pyproject.toml --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index bca515f9..18f3a576 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -143,6 +143,7 @@ keywords = [ "Seven", "SFR", "Signal", + "SIGNL4", "SimplePush", "Sinch", "Slack", From 47e432be2006b750db06e9a3253362a3f2ea6701 Mon Sep 17 00:00:00 2001 From: Ron Date: Tue, 29 Jul 2025 14:54:54 +0200 Subject: [PATCH 3/6] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d6a96523..91f5aab2 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ The table below identifies the services this tool supports and some example serv | [SendGrid](https://github.com/caronc/apprise/wiki/Notify_sendgrid) | sendgrid:// | (TCP) 443 | sendgrid://APIToken:FromEmail/
sendgrid://APIToken:FromEmail/ToEmail
sendgrid://APIToken:FromEmail/ToEmail1/ToEmail2/ToEmailN/ | [ServerChan](https://github.com/caronc/apprise/wiki/Notify_serverchan) | schan:// | (TCP) 443 | schan://sendkey/ | [Signal API](https://github.com/caronc/apprise/wiki/Notify_signal) | signal:// or signals:// | (TCP) 80 or 443 | signal://hostname:port/FromPhoneNo
signal://hostname:port/FromPhoneNo/ToPhoneNo
signal://hostname:port/FromPhoneNo/ToPhoneNo1/ToPhoneNo2/ToPhoneNoN/ +| [SIGNL4](https://github.com/caronc/apprise/wiki/Notify_signl4) | signl4:// | (TCP) 80 or 443 | sign4l://secret | [SimplePush](https://github.com/caronc/apprise/wiki/Notify_simplepush) | spush:// | (TCP) 443 | spush://apikey
spush://salt:password@apikey
spush://apikey?event=Apprise | [Slack](https://github.com/caronc/apprise/wiki/Notify_slack) | slack:// | (TCP) 443 | slack://TokenA/TokenB/TokenC/
slack://TokenA/TokenB/TokenC/Channel
slack://botname@TokenA/TokenB/TokenC/Channel
slack://user@TokenA/TokenB/TokenC/Channel1/Channel2/ChannelN | [SMTP2Go](https://github.com/caronc/apprise/wiki/Notify_smtp2go) | smtp2go:// | (TCP) 443 | smtp2go://user@hostname/apikey
smtp2go://user@hostname/apikey/email
smtp2go://user@hostname/apikey/email1/email2/emailN
smtp2go://user@hostname/apikey/?name="From%20User" From 52767796b784c1e8d5702e5dc73c218b90b2474e Mon Sep 17 00:00:00 2001 From: Ron Date: Tue, 29 Jul 2025 14:56:54 +0200 Subject: [PATCH 4/6] Update python-apprise.spec --- packaging/redhat/python-apprise.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/redhat/python-apprise.spec b/packaging/redhat/python-apprise.spec index 68b628db..253ad8d6 100644 --- a/packaging/redhat/python-apprise.spec +++ b/packaging/redhat/python-apprise.spec @@ -69,7 +69,7 @@ notification services. It supports sending alerts to platforms such as: \ `ParsePlatform`, `Plivo`, `PopcornNotify`, `Prowl`, `Pushalot`, \ `PushBullet`, `Pushjet`, `PushMe`, `Pushover`, `Pushplus`, `PushSafer`, \ `Pushy`, `PushDeer`, `QQ Push`, `Revolt`, `Reddit`, `Resend`, `Rocket.Chat`, \ -`RSyslog`, `SendGrid`, `ServerChan`, `Seven`, `SFR`, `Signal`, \ +`RSyslog`, `SendGrid`, `ServerChan`, `Seven`, `SFR`, `Signal`, `SIGNL4`, \ `SimplePush`, `Sinch`, `Slack`, `SMPP`, `SMSEagle`, `SMS Manager`, \ `SMTP2Go`, `SparkPost`, `Splunk`, `Spike`, `Spug Push`, `Super Toasty`, \ `Streamlabs`, `Stride`, `Synology Chat`, `Syslog`, `Techulus Push`, \ From fd69c2897e79ec15a0763105e8bc28e22ed1901a Mon Sep 17 00:00:00 2001 From: Ron Date: Tue, 29 Jul 2025 15:15:08 +0200 Subject: [PATCH 5/6] Update signl4.py --- apprise/plugins/signl4.py | 45 ++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/apprise/plugins/signl4.py b/apprise/plugins/signl4.py index cc3047ee..738eebe5 100644 --- a/apprise/plugins/signl4.py +++ b/apprise/plugins/signl4.py @@ -32,7 +32,6 @@ import requests from json import dumps - from .base import NotifyBase from ..url import PrivacyMode from ..common import NotifyType @@ -103,8 +102,9 @@ class NotifySIGNL4(NotifyBase): }, }) - def __init__(self, secret, service=None, location=None, alerting_scenario=None, - filtering=None, external_id=None, status=None, **kwargs): + def __init__(self, secret, service=None, location=None, + alerting_scenario=None, filtering=None, + external_id=None, status=None, **kwargs): """ Initialize SIGNL4 Object """ @@ -176,10 +176,9 @@ class NotifySIGNL4(NotifyBase): # Prepare our URL notify_url = self.service_url + self.secret - self.logger.debug("SIGNL4 POST URL: %s (cert_verify=%r)" % ( - notify_url, self.verify_certificate, - )) - self.logger.debug("SIGNL4 Payload: %s" % str(payload)) + self.logger.debug("SIGNL4 POST URL: {notify_url} \ + (cert_verify={self.verify_certificate}") + self.logger.debug("SIGNL4 Payload: {payload}") # Always call throttle before any remote server i/o is made self.throttle() @@ -218,8 +217,8 @@ class NotifySIGNL4(NotifyBase): except requests.RequestException as e: self.logger.warning( "A Connection error occurred sending SIGNL4 " - "notification to %s." % self.host) - self.logger.debug("Socket Exception: %s" % str(e)) + "notification to {self.host}.") + self.logger.debug("Socket Exception: " + str(e)) # Return; we're done return False @@ -300,21 +299,29 @@ class NotifySIGNL4(NotifyBase): NotifySIGNL4.unquote(results["host"]) if "service" in results["qsd"] and len(results["qsd"]["service"]): - results["service"] = NotifySIGNL4.unquote(results["qsd"]["service"]) - - if "location" in results["qsd"] and len(results["qsd"]["location"]): - results["location"] = NotifySIGNL4.unquote(results["qsd"]["location"]) + results["service"] = \ + NotifySIGNL4.unquote(results["qsd"]["service"]) - if "alerting_scenario" in results["qsd"] and len(results["qsd"]["alerting_scenario"]): - results["alerting_scenario"] = NotifySIGNL4.unquote(results["qsd"]["alerting_scenario"]) + if "location" in results["qsd"] and len(results["qsd"]["location"]): + results["location"] = \ + NotifySIGNL4.unquote(results["qsd"]["location"]) + + if "alerting_scenario" in results["qsd"] and \ + len(results["qsd"]["alerting_scenario"]): + results["alerting_scenario"] = \ + NotifySIGNL4.unquote(results["qsd"]["alerting_scenario"]) if "filtering" in results["qsd"] and len(results["qsd"]["filtering"]): - results["filtering"] = NotifySIGNL4.unquote(results["qsd"]["filtering"]) + results["filtering"] = \ + NotifySIGNL4.unquote(results["qsd"]["filtering"]) - if "external_id" in results["qsd"] and len(results["qsd"]["external_id"]): - results["external_id"] = NotifySIGNL4.unquote(results["qsd"]["external_id"]) + if "external_id" in results["qsd"] and \ + len(results["qsd"]["external_id"]): + results["external_id"] = \ + NotifySIGNL4.unquote(results["qsd"]["external_id"]) if "status" in results["qsd"] and len(results["qsd"]["status"]): - results["status"] = NotifySIGNL4.unquote(results["qsd"]["status"]) + results["status"] = \ + NotifySIGNL4.unquote(results["qsd"]["status"]) return results From 56445293caaafc9b2c2ce5d354a21cd2d2624702 Mon Sep 17 00:00:00 2001 From: Ron Date: Wed, 30 Jul 2025 12:47:48 +0200 Subject: [PATCH 6/6] Update signl4.py --- apprise/plugins/signl4.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apprise/plugins/signl4.py b/apprise/plugins/signl4.py index 738eebe5..1e8350bd 100644 --- a/apprise/plugins/signl4.py +++ b/apprise/plugins/signl4.py @@ -102,9 +102,15 @@ class NotifySIGNL4(NotifyBase): }, }) - def __init__(self, secret, service=None, location=None, - alerting_scenario=None, filtering=None, - external_id=None, status=None, **kwargs): + def __init__(self, + secret, + service=None, + location=None, + alerting_scenario=None, + filtering=None, + external_id=None, + status=None, + **kwargs): """ Initialize SIGNL4 Object """ @@ -242,9 +248,7 @@ class NotifySIGNL4(NotifyBase): """ # Define any URL parameters - params = { - "region": "none", - } + params = {} if self.service is not None: params["service"] = self.service @@ -267,7 +271,7 @@ class NotifySIGNL4(NotifyBase): # Extend our parameters params.update(self.url_parameters(privacy=privacy, *args, **kwargs)) - url = "{schema}://{secret}/" + url = "{schema}://{secret}" return url.format( schema=self.secure_protocol,