dowstream: remove noop WEBPUSH REGISTER

We still want to update the updated_at column when a client
refreshes the subscription.
This commit is contained in:
Simon Ser 2022-07-11 22:54:51 +02:00
parent 4e683af535
commit 1e78e3e4b0

View File

@ -3309,16 +3309,6 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
}
if oldSub != nil {
if oldSub.Keys.VAPID == newSub.Keys.VAPID && oldSub.Keys.Auth == newSub.Keys.Auth && oldSub.Keys.P256DH == newSub.Keys.P256DH {
// Nothing has changed, this is a no-op
dc.SendMessage(&irc.Message{
Prefix: dc.srv.prefix(),
Command: "WEBPUSH",
Params: []string{"REGISTER", endpoint},
})
return nil
}
// Update the old subscription instead of creating a new one
newSub.ID = oldSub.ID
}