Send instance URL as Web Push JWT subject

This commit is contained in:
Vyr Cossont 2024-12-01 21:17:54 -08:00
parent dcac7f2035
commit a356c860dd

View file

@ -27,6 +27,7 @@
webpushgo "github.com/SherClockHolmes/webpush-go"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/filter/usermute"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
@ -225,6 +226,7 @@ func (r *realSender) sendToSubscription(
},
&webpushgo.Options{
HTTPClient: r.httpClient,
Subscriber: "https://" + config.GetHost(),
VAPIDPublicKey: vapidKeyPair.Public,
VAPIDPrivateKey: vapidKeyPair.Private,
TTL: int(TTL.Seconds()),