server: fix malformed Web Push subscriber URI
The library prepends "mailto:".
This commit is contained in:
parent
3e1efea6e5
commit
6729297159
10
server.go
10
server.go
@ -339,10 +339,12 @@ 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:
|
||||||
TTL: 7 * 24 * 60 * 60, // seconds
|
// https://github.com/SherClockHolmes/webpush-go/pull/57
|
||||||
Urgency: urgency,
|
Subscriber: "webpush@soju.im",
|
||||||
RecordSize: 2048,
|
TTL: 7 * 24 * 60 * 60, // seconds
|
||||||
|
Urgency: urgency,
|
||||||
|
RecordSize: 2048,
|
||||||
}
|
}
|
||||||
|
|
||||||
if vapidPubKey != options.VAPIDPublicKey {
|
if vapidPubKey != options.VAPIDPublicKey {
|
||||||
|
Loading…
Reference in New Issue
Block a user