From f34b258e3934b3f94ca8e17d69563f1aa773a3b2 Mon Sep 17 00:00:00 2001 From: Stephen Muth Date: Tue, 27 Jul 2021 14:23:29 -0400 Subject: [PATCH] Allow for priorities <=0 If a message is created without the priority field, it defaults to 0. Negative priorities are technically allowed, though I doubt anything uses them. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 2e4a6bf..d612e31 100644 --- a/main.py +++ b/main.py @@ -56,7 +56,7 @@ def get_picture(appid): def send_notification(message): m = json.loads(message) - if 1 <= m['priority'] <= 3: + if m['priority'] <= 3: subprocess.Popen(['notify-send', m['title'], m['message'], "-u", "low", "-i", get_picture(m['appid'])]) if 4 <= m['priority'] <= 7: subprocess.Popen(['notify-send', m['title'], m['message'], "-u", "normal", "-i", get_picture(m['appid'])])