Skip to content

Commit

Permalink
Merge pull request #80 from TonPC64/master
Browse files Browse the repository at this point in the history
use var MessageTypeFlex for set type flexMessage
  • Loading branch information
sugyan authored Jun 19, 2018
2 parents 64bb62f + 64b4c72 commit 12795b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linebot/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ type FlexMessage struct {
// MarshalJSON method of FlexMessage
func (m *FlexMessage) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
Type string `json:"type"`
Type MessageType `json:"type"`
AltText string `json:"altText"`
Contents map[string]interface{} `json:"contents"`
}{
Type: "flex",
Type: MessageTypeFlex,
AltText: m.AltText,
Contents: m.Contents,
})
Expand Down

0 comments on commit 12795b5

Please sign in to comment.