1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-28 01:15:43 +02:00

Remove awkward subscription id

This commit is contained in:
binwiederhier 2023-02-12 14:09:44 -05:00
parent 9131d3d521
commit cc309e87e9
12 changed files with 67 additions and 104 deletions

View file

@ -105,12 +105,19 @@ func (t *Tier) Context() log.Context {
// Subscription represents a user's topic subscription
type Subscription struct {
ID string `json:"id"`
BaseURL string `json:"base_url"`
Topic string `json:"topic"`
DisplayName *string `json:"display_name"`
}
// Context returns fields for the log
func (s *Subscription) Context() log.Context {
return log.Context{
"base_url": s.BaseURL,
"topic": s.Topic,
}
}
// NotificationPrefs represents the user's notification settings
type NotificationPrefs struct {
Sound *string `json:"sound,omitempty"`