Add priority to notification rules

This commit is contained in:
2023-01-12 07:20:48 +00:00
parent e01aea7712
commit 0b840d227b
4 changed files with 30 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ def rule_matched(rule, message, matched_fields):
notify_message = f"{rule.name} matched on {matched_fields}\n{message}"
notify_message = notify_message.encode("utf-8", "replace")
sendmsg(rule.user, notify_message, title=title)
sendmsg(rule.user, notify_message, title=title, priority=str(rule.priority))
def process_rules(data):