fix: push notification
This commit is contained in:
@@ -77,8 +77,10 @@ func (p *PushSender) SendToUser(ctx context.Context, userID string, payload Push
|
|||||||
Subscriber: p.subject,
|
Subscriber: p.subject,
|
||||||
VAPIDPublicKey: p.pub,
|
VAPIDPublicKey: p.pub,
|
||||||
VAPIDPrivateKey: p.priv,
|
VAPIDPrivateKey: p.priv,
|
||||||
TTL: 60,
|
// Hold the message for up to 6h so a sleeping/offline device
|
||||||
Urgency: webpush.UrgencyNormal,
|
// still gets it on wake (60s would silently expire meanwhile).
|
||||||
|
TTL: 6 * 60 * 60,
|
||||||
|
Urgency: webpush.UrgencyNormal,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
p.logger.Warn("push: send failed", zap.String("user", userID), zap.Error(err))
|
p.logger.Warn("push: send failed", zap.String("user", userID), zap.Error(err))
|
||||||
|
|||||||
Reference in New Issue
Block a user