diff --git a/client/inputMapper.go b/client/inputMapper.go index b89adc5..513b8a3 100644 --- a/client/inputMapper.go +++ b/client/inputMapper.go @@ -65,20 +65,6 @@ type Secrets struct { } func mapActivity(activity *Activity) *PayloadActivity { - // Replace empty fields by "none" - if activity.LargeImage == "" { - activity.LargeImage = "none" - } - if activity.LargeText == "" { - activity.LargeText = "none" - } - if activity.SmallImage == "" { - activity.SmallImage = "none" - } - if activity.SmallText == "" { - activity.SmallText = "none" - } - final := &PayloadActivity{ Details: activity.Details, State: activity.State, diff --git a/client/types.go b/client/types.go index a0b60aa..c32795c 100644 --- a/client/types.go +++ b/client/types.go @@ -17,9 +17,9 @@ type Args struct { } type PayloadActivity struct { - Details string `json:"details"` - State string `json:"state"` - Assets PayloadAssets `json:"assets"` + Details string `json:"details,omitempty"` + State string `json:"state,omitempty"` + Assets PayloadAssets `json:"assets,omitempty"` Party *PayloadParty `json:"party,omitempty"` Timestamps *PayloadTimestamps `json:"timestamps,omitempty"` Secrets *PayloadSecrets `json:"secrets,omitempty"` @@ -27,15 +27,15 @@ type PayloadActivity struct { } type PayloadAssets struct { - LargeImage string `json:"large_image"` - LargeText string `json:"large_text"` - SmallImage string `json:"small_image"` - SmallText string `json:"small_text"` + LargeImage string `json:"large_image,omitempty"` + LargeText string `json:"large_text,omitempty"` + SmallImage string `json:"small_image,omitempty"` + SmallText string `json:"small_text,omitempty"` } type PayloadParty struct { - ID string `json:"id"` - Size [2]int `json:"size"` + ID string `json:"id,omitempty"` + Size [2]int `json:"size,omitempty"` } type PayloadTimestamps struct {