Skip to content

Commit

Permalink
fix activity fields not being marked as omitempty
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Feb 1, 2024
1 parent 51c65aa commit d3e0672
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Activity struct {
ID string `json:"id"`
Name string `json:"name"`
Type ActivityType `json:"type"`
URL *string `json:"url"`
URL *string `json:"url,omitempty"`
CreatedAt time.Time `json:"created_at"`
Timestamps *ActivityTimestamps `json:"timestamps,omitempty"`
SyncID *string `json:"sync_id,omitempty"`
Expand All @@ -40,7 +40,7 @@ type Activity struct {
Secrets *ActivitySecrets `json:"secrets,omitempty"`
Instance *bool `json:"instance,omitempty"`
Flags ActivityFlags `json:"flags,omitempty"`
Buttons []string `json:"buttons"`
Buttons []string `json:"buttons,omitempty"`
}

func (a *Activity) UnmarshalJSON(data []byte) error {
Expand Down

0 comments on commit d3e0672

Please sign in to comment.