1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-11 15:19:02 +02:00

Cosmetic changess

This commit is contained in:
binwiederhier 2023-06-15 22:25:05 -04:00
parent b197ea3ab6
commit 6e95d62726
4 changed files with 65 additions and 45 deletions
server

View file

@ -474,7 +474,7 @@ type apiWebPushUpdateSubscriptionRequest struct {
Topics []string `json:"topics"`
}
// List of possible Web Push events
// List of possible Web Push events (see sw.js)
const (
webPushMessageEvent = "message"
webPushExpiringEvent = "subscription_expiring"
@ -486,8 +486,8 @@ type webPushPayload struct {
Message *message `json:"message"`
}
func newWebPushPayload(subscriptionID string, message *message) webPushPayload {
return webPushPayload{
func newWebPushPayload(subscriptionID string, message *message) *webPushPayload {
return &webPushPayload{
Event: webPushMessageEvent,
SubscriptionID: subscriptionID,
Message: message,
@ -498,8 +498,8 @@ type webPushControlMessagePayload struct {
Event string `json:"event"`
}
func newWebPushSubscriptionExpiringPayload() webPushControlMessagePayload {
return webPushControlMessagePayload{
func newWebPushSubscriptionExpiringPayload() *webPushControlMessagePayload {
return &webPushControlMessagePayload{
Event: webPushExpiringEvent,
}
}