This commit is contained in:
quantulr
2024-03-28 14:41:58 +08:00
parent 048b587396
commit 68b842a93b
3 changed files with 5 additions and 3 deletions

View File

@ -483,6 +483,8 @@ event_type:
event_level: event_level:
high: high:
- 192518
- 192517
- 192515 - 192515
- 192514 - 192514
- 192513 - 192513

View File

@ -92,9 +92,9 @@ async def handle_event_detail(event_detail: dict, config: dict, redis: Redis):
# 根据设备名称获取 user_ids # 根据设备名称获取 user_ids
# 高级事件 # 高级事件
if event_detail["eventLvl"] == 3: 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 user_ids = user_ids + user_all
# 除高级外均为中级 # 除高级外均为中级
else: else:

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "hik-push" name = "hik-push"
version = "1.0.5" version = "1.1.0"
description = "" description = ""
authors = ["quantulr <35954003+quantulr@users.noreply.github.com>"] authors = ["quantulr <35954003+quantulr@users.noreply.github.com>"]
readme = "README.md" readme = "README.md"