Manual changes

This commit is contained in:
binwiederhier
2026-02-16 20:02:19 -05:00
parent 4e5f95ba0c
commit 82e15d84bd
2 changed files with 40 additions and 37 deletions

21
webpush/types.go Normal file
View File

@@ -0,0 +1,21 @@
package webpush
import "heckel.io/ntfy/v2/log"
// Subscription represents a web push subscription.
type Subscription struct {
ID string
Endpoint string
Auth string
P256dh string
UserID string
}
// Context returns the logging context for the subscription.
func (w *Subscription) Context() log.Context {
return map[string]any{
"web_push_subscription_id": w.ID,
"web_push_subscription_user_id": w.UserID,
"web_push_subscription_endpoint": w.Endpoint,
}
}