From ab5c6d6afa23229a85510385adef209840c93b74 Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Mon, 3 Jul 2023 12:23:15 -0400 Subject: [PATCH] Add authentication to ntfy --- chutney.sample.cfg | 1 + chutney/garage/garagelistener.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/chutney.sample.cfg b/chutney.sample.cfg index badda74..de34d1d 100644 --- a/chutney.sample.cfg +++ b/chutney.sample.cfg @@ -9,3 +9,4 @@ lon=lon uri=uri ntfy=ntfy.sh topic=topic +auth=auth diff --git a/chutney/garage/garagelistener.py b/chutney/garage/garagelistener.py index 707c35a..c141726 100644 --- a/chutney/garage/garagelistener.py +++ b/chutney/garage/garagelistener.py @@ -11,8 +11,9 @@ class GarageListener: ntfy = config['garage'].get('ntfy') topic = config['garage'].get('topic') + auth = config['garage'].get('auth') - self.ntfyUri = f'https://{ntfy}/{topic}/json' + self.ntfyUri = f'https://{ntfy}/{topic}/json?auth={auth}' def listenForNotifications(self, queue): with requests.get(self.ntfyUri, stream=True, timeout=60) as response: