mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-31 07:27:57 +00:00
Compare severity in send_alert's no-op update check (#24084)
send_alert()'s short circuit for skipping a no-op "update" push only compared object and zone counts between before/after, never severity. Both underlying collections are cumulative and deduplicated (objects is a set of labels, zones only appends a zone not already present), so a segment being promoted from detection to alert can leave both counts unchanged, silently dropping the single most notable transition in a review's life. Add a severity comparison to the same check so a detection -> alert promotion always notifies.
This commit is contained in:
parent
41bc24cce4
commit
65fe6b610a
@ -421,6 +421,7 @@ class WebPushClient(Communicator):
|
||||
# Don't notify if message is an update and important fields don't have an update
|
||||
if (
|
||||
state == "update"
|
||||
and payload["before"]["severity"] == payload["after"]["severity"]
|
||||
and len(payload["before"]["data"]["objects"])
|
||||
== len(payload["after"]["data"]["objects"])
|
||||
and len(payload["before"]["data"]["zones"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user