mirror of
https://github.com/simbelmas/gotify-dunst.git
synced 2026-01-19 14:35:23 +01:00
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.
This commit is contained in:
2
main.py
2
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'])])
|
||||
|
||||
Reference in New Issue
Block a user