From 68b842a93b31f464841e4241ad2c620f07c2aec7 Mon Sep 17 00:00:00 2001 From: quantulr <35954003+quantulr@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:41:58 +0800 Subject: [PATCH] update --- config.yaml | 2 ++ hik_push/push_notification.py | 4 ++-- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.yaml b/config.yaml index 19f09d8..75b5aa5 100644 --- a/config.yaml +++ b/config.yaml @@ -483,6 +483,8 @@ event_type: event_level: high: + - 192518 + - 192517 - 192515 - 192514 - 192513 diff --git a/hik_push/push_notification.py b/hik_push/push_notification.py index 941b87e..321e530 100644 --- a/hik_push/push_notification.py +++ b/hik_push/push_notification.py @@ -92,9 +92,9 @@ async def handle_event_detail(event_detail: dict, config: dict, redis: Redis): # 根据设备名称获取 user_ids # 高级事件 if event_detail["eventLvl"] == 3: - user_all = user_map.get("all", {}).get("high", []) + user_all = user_map.get("all", {}).get("high", []) + user_map.get("all", {}).get("all", []) # 接受全部通知的用户 - user_ids = user_map.get(device_name, {}).get("high", []) + user_ids = user_map.get(device_name, {}).get("high", []) + user_map.get(device_name, {}).get("all", []) user_ids = user_ids + user_all # 除高级外均为中级 else: diff --git a/pyproject.toml b/pyproject.toml index 39b3df8..8ca5cdf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "hik-push" -version = "1.0.5" +version = "1.1.0" description = "" authors = ["quantulr <35954003+quantulr@users.noreply.github.com>"] readme = "README.md"