mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 04:40:37 +03:00
Fix nre when handling failed browser push notifications. Closes #2855
This commit is contained in:
parent
559ec45f0f
commit
0533bf4092
1 changed files with 4 additions and 2 deletions
|
@ -72,10 +72,12 @@ func (b *Browser) Send(
|
||||||
// Not really the subscriber, but a contact point for the sender.
|
// Not really the subscriber, but a contact point for the sender.
|
||||||
Subscriber: "owncast@owncast.online",
|
Subscriber: "owncast@owncast.online",
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return false, errors.Wrap(err, "error sending browser push notification")
|
||||||
|
}
|
||||||
|
|
||||||
if resp.StatusCode == 410 {
|
if resp.StatusCode == 410 {
|
||||||
return true, nil
|
return true, nil
|
||||||
} else if err != nil {
|
|
||||||
return false, errors.Wrap(err, "error sending browser push notification")
|
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue