Bump update time on success in network.broadcastWebPush
Allows us to skip checks when the client sends WEBPUSH REGISTER and avoid pruning subscriptions that still work fine.
This commit is contained in:
parent
93af53c91d
commit
a14ea80cb9
5
user.go
5
user.go
@ -516,6 +516,11 @@ func (net *network) broadcastWebPush(msg *irc.Message) {
|
||||
}
|
||||
} else if err != nil {
|
||||
net.logger.Printf("failed to send Web push notification to endpoint %q: %v", sub.Endpoint, err)
|
||||
} else {
|
||||
// On success, bump the subscription's update time
|
||||
if err := net.user.srv.db.StoreWebPushSubscription(ctx, net.user.ID, net.ID, &sub); err != nil {
|
||||
net.logger.Printf("failed to store Web push subscription: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user