Browse Source

Fix nre when handling failed browser push notifications. Closes #2855

pull/2860/head
Gabe Kangas 2 years ago
parent
commit
0533bf4092
No known key found for this signature in database
GPG Key ID: 4345B2060657F330
  1. 6
      notifications/browser/browser.go

6
notifications/browser/browser.go

@ -72,10 +72,12 @@ func (b *Browser) Send( @@ -72,10 +72,12 @@ func (b *Browser) Send(
// Not really the subscriber, but a contact point for the sender.
Subscriber: "owncast@owncast.online",
})
if err != nil {
return false, errors.Wrap(err, "error sending browser push notification")
}
if resp.StatusCode == 410 {
return true, nil
} else if err != nil {
return false, errors.Wrap(err, "error sending browser push notification")
}
defer resp.Body.Close()

Loading…
Cancel
Save