Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template action label is optional for image carousel. #74

Merged
merged 1 commit into from
May 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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