mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-11-22 19:33:27 +01:00
Set default TTL for web push to the cache duration
This commit is contained in:
parent
9e4eafe8d5
commit
4704b2a0e4
1 changed files with 1 additions and 0 deletions
|
@ -116,6 +116,7 @@ func (s *Server) sendWebPushNotification(message []byte, sub *webPushSubscriptio
|
||||||
VAPIDPublicKey: s.config.WebPushPublicKey,
|
VAPIDPublicKey: s.config.WebPushPublicKey,
|
||||||
VAPIDPrivateKey: s.config.WebPushPrivateKey,
|
VAPIDPrivateKey: s.config.WebPushPrivateKey,
|
||||||
Urgency: webpush.UrgencyHigh, // iOS requires this to ensure delivery
|
Urgency: webpush.UrgencyHigh, // iOS requires this to ensure delivery
|
||||||
|
TTL: int(s.config.CacheDuration.Seconds()),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Tag(tagWebPush).Err(err).Fields(*ctx).Debug("Unable to publish web push message, removing endpoint")
|
log.Tag(tagWebPush).Err(err).Fields(*ctx).Debug("Unable to publish web push message, removing endpoint")
|
||||||
|
|
Loading…
Reference in a new issue