From 4808a7d7fd5b9bf2b74652c88aa71371ddff8d67 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 21 Jul 2024 19:22:13 -0600 Subject: [PATCH] Change ttl dynamically --- frigate/comms/webpush.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frigate/comms/webpush.py b/frigate/comms/webpush.py index d78c52547..65dae60d1 100644 --- a/frigate/comms/webpush.py +++ b/frigate/comms/webpush.py @@ -152,11 +152,12 @@ class WebPushClient(Communicator): # type: ignore[misc] endpoint[0 : endpoint.index("/", 10)] ].copy() headers["urgency"] = "high" + ttl = 3600 if state == "end" else 0 # send message resp = pusher.send( headers=headers, - ttl=3600, + ttl=ttl, data=json.dumps( { "title": title,