Skip to content

Commit

Permalink
Fix behavior headers
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Jul 21, 2024
1 parent 22afd24 commit b8f8da1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions frigate/comms/webpush.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,16 @@ def send_alert(self, payload: dict[str, any]) -> None:

for pusher in self.web_pushers:
endpoint = pusher.subscription_info["endpoint"]

# set headers with behavior
headers = self.claim_headers[endpoint[0 : endpoint.index("/", 10)]].copy()
headers["urgency"] = "high"
headers["topic"] = reviewId

# send message
pusher.send(
headers=self.claim_headers[endpoint[0 : endpoint.index("/", 10)]],
headers=headers,
ttl=3600,
urgency="high",
topic=reviewId,
data=json.dumps(
{
"title": title,
Expand Down

0 comments on commit b8f8da1

Please sign in to comment.