server: fix malformed Web Push subscriber URI

The library prepends "mailto:".
This commit is contained in:
Simon Ser 2023-12-09 01:30:48 +01:00
parent 3e1efea6e5
commit 6729297159

View File

@ -339,7 +339,9 @@ func (s *Server) sendWebPush(ctx context.Context, sub *webpush.Subscription, vap
}, },
VAPIDPublicKey: s.webPush.VAPIDKeys.Public, VAPIDPublicKey: s.webPush.VAPIDKeys.Public,
VAPIDPrivateKey: s.webPush.VAPIDKeys.Private, VAPIDPrivateKey: s.webPush.VAPIDKeys.Private,
Subscriber: "https://soju.im", // TODO: switch back to an HTTP URL once this is merged:
// https://github.com/SherClockHolmes/webpush-go/pull/57
Subscriber: "webpush@soju.im",
TTL: 7 * 24 * 60 * 60, // seconds TTL: 7 * 24 * 60 * 60, // seconds
Urgency: urgency, Urgency: urgency,
RecordSize: 2048, RecordSize: 2048,