From 67292971593ecda868ca1cc17415f48da8a36662 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 9 Dec 2023 01:30:48 +0100 Subject: [PATCH] server: fix malformed Web Push subscriber URI The library prepends "mailto:". --- server.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server.go b/server.go index 552104e..db62678 100644 --- a/server.go +++ b/server.go @@ -339,10 +339,12 @@ func (s *Server) sendWebPush(ctx context.Context, sub *webpush.Subscription, vap }, VAPIDPublicKey: s.webPush.VAPIDKeys.Public, VAPIDPrivateKey: s.webPush.VAPIDKeys.Private, - Subscriber: "https://soju.im", - TTL: 7 * 24 * 60 * 60, // seconds - Urgency: urgency, - RecordSize: 2048, + // 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 + Urgency: urgency, + RecordSize: 2048, } if vapidPubKey != options.VAPIDPublicKey {