Skip to content

Commit

Permalink
Merge pull request #74 from waylen888/master
Browse files Browse the repository at this point in the history
Template action label is optional for image carousel.
  • Loading branch information
sugyan committed May 7, 2018
2 parents 89f8344 + 76be767 commit 424c055
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions linebot/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ type URITemplateAction struct {
func (a *URITemplateAction) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
Type TemplateActionType `json:"type"`
Label string `json:"label"`
Label string `json:"label,omitempty"`
URI string `json:"uri"`
}{
Type: TemplateActionTypeURI,
Expand All @@ -284,7 +284,7 @@ type MessageTemplateAction struct {
func (a *MessageTemplateAction) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
Type TemplateActionType `json:"type"`
Label string `json:"label"`
Label string `json:"label,omitempty"`
Text string `json:"text"`
}{
Type: TemplateActionTypeMessage,
Expand All @@ -305,7 +305,7 @@ type PostbackTemplateAction struct {
func (a *PostbackTemplateAction) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
Type TemplateActionType `json:"type"`
Label string `json:"label"`
Label string `json:"label,omitempty"`
Data string `json:"data"`
Text string `json:"text,omitempty"`
DisplayText string `json:"displayText,omitempty"`
Expand All @@ -332,7 +332,7 @@ type DatetimePickerTemplateAction struct {
func (a *DatetimePickerTemplateAction) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
Type TemplateActionType `json:"type"`
Label string `json:"label"`
Label string `json:"label,omitempty"`
Data string `json:"data"`
Mode string `json:"mode"`
Initial string `json:"initial,omitempty"`
Expand Down

0 comments on commit 424c055

Please sign in to comment.