Repository: line/line-bot-sdk-go
Pull request #314 (2022-05-17 10:28:04)

Add two parameters to PostbackAction
# Overview
On May 13th, a function to open and close the rich menu automatically when you tap the rich menu, etc. were added.

## Related issue
- #313 

## Reference
https://developers.line.biz/en/news/2022/05/13/richmenu-keyboard/

## Operation check
```golang
templateMessage := linebot.NewTemplateMessage(
	"タイトル",
	linebot.NewButtonsTemplate(
		"",
		"タイトル",
		"テキスト",
		linebot.NewPostbackAction("Buy", "action=buy&itemid=123", "", "", linebot.InputOptionOpenKeyboard, ""),
		linebot.NewPostbackAction("Buy", "action=buy&itemid=123", "", "", "openKeyboard", "t"),
	),
)
if _, err = bot.ReplyMessage(event.ReplyToken, templateMessage).Do(); err != nil {
	log.Print(err)
}
```

<img src="https://user-images.githubusercontent.com/49806926/168790652-254014c5-ea77-455f-b959-cc9515ee7d08.jpg" width="400">


Patch:
diff --git a/examples/kitchensink/server.go b/examples/kitchensink/server.go
index 7a64367..f019eed 100644
--- a/examples/kitchensink/server.go
+++ b/examples/kitchensink/server.go
@@ -187,8 +187,8 @@ func (app *KitchenSink) handleText(message *linebot.TextMessage, replyToken stri
 		template := linebot.NewButtonsTemplate(
 			imageURL, "My button sample", "Hello, my button",
 			linebot.NewURIAction("Go to line.me", "https://line.me"),
-			linebot.NewPostbackAction("Say hello1", "hello こんにちは", "", "hello こんにちは"),
-			linebot.NewPostbackAction("言 hello2", "hello こんにちは", "hello こんにちは", ""),
+			linebot.NewPostbackAction("Say hello1", "hello こんにちは", "", "hello こんにちは", "", ""),
+			linebot.NewPostbackAction("言 hello2", "hello こんにちは", "hello こんにちは", "", "", ""),
 			linebot.NewMessageAction("Say message", "Rice=米"),
 		)
 		if _, err := app.bot.ReplyMessage(
@@ -215,11 +215,11 @@ func (app *KitchenSink) handleText(message *linebot.TextMessage, replyToken stri
 			linebot.NewCarouselColumn(
 				imageURL, "hoge", "fuga",
 				linebot.NewURIAction("Go to line.me", "https://line.me"),
-				linebot.NewPostbackAction("Say hello1", "hello こんにちは", "", ""),
+				linebot.NewPostbackAction("Say hello1", "hello こんにちは", "", "", "", ""),
 			),
 			linebot.NewCarouselColumn(
 				imageURL, "hoge", "fuga",
-				linebot.NewPostbackAction("言 hello2", "hello こんにちは", "hello こんにちは", ""),
+				linebot.NewPostbackAction("言 hello2", "hello こんにちは", "hello こんにちは", "", "", ""),
 				linebot.NewMessageAction("Say message", "Rice=米"),
 			),
 		)
@@ -238,7 +238,7 @@ func (app *KitchenSink) handleText(message *linebot.TextMessage, replyToken stri
 			),
 			linebot.NewImageCarouselColumn(
 				imageURL,
-				linebot.NewPostbackAction("Say hello1", "hello こんにちは", "", ""),
+				linebot.NewPostbackAction("Say hello1", "hello こんにちは", "", "", "", ""),
 			),
 			linebot.NewImageCarouselColumn(
 				imageURL,
diff --git a/linebot/actions.go b/linebot/actions.go
index c965819..184280f 100644
--- a/linebot/actions.go
+++ b/linebot/actions.go
@@ -30,6 +30,17 @@ const (
 	ActionTypeLocation       ActionType = "location"
 )
 
+// InputOption type
+type InputOption string
+
+// InputOption constants
+const (
+	InputOptionCloseRichMenu InputOption = "closeRichMenu"
+	InputOptionOpenRichMenu  InputOption = "openRichMenu"
+	InputOptionOpenKeyboard  InputOption = "openKeyboard"
+	InputOptionOpenVoice     InputOption = "openVoice"
+)
+
 // Action interface
 type Action interface {
 	json.Marshaler
@@ -99,22 +110,28 @@ type PostbackAction struct {
 	Data        string
 	Text        string
 	DisplayText string
+	InputOption InputOption
+	FillInText  string
 }
 
 // MarshalJSON method of PostbackAction
 func (a *PostbackAction) MarshalJSON() ([]byte, error) {
 	return json.Marshal(&struct {
 		Type        ActionType `json:"type"`
-		Label       string     `json:"label,omitempty"`
-		Data        string     `json:"data"`
-		Text        string     `json:"text,omitempty"`
-		DisplayText string     `json:"displayText,omitempty"`
+		Label       string      `json:"label,omitempty"`
+		Data        string      `json:"data"`
+		Text        string      `json:"text,omitempty"`
+		DisplayText string      `json:"displayText,omitempty"`
+		InputOption InputOption `json:"inputOption,omitempty"`
+		FillInText  string      `json:"fillInText,omitempty"`
 	}{
 		Type:        ActionTypePostback,
 		Label:       a.Label,
 		Data:        a.Data,
 		Text:        a.Text,
 		DisplayText: a.DisplayText,
+		InputOption: a.InputOption,
+		FillInText:  a.FillInText,
 	})
 }
 
@@ -247,12 +264,14 @@ func NewMessageAction(label, text string) *MessageAction {
 }
 
 // NewPostbackAction function
-func NewPostbackAction(label, data, text, displayText string) *PostbackAction {
+func NewPostbackAction(label, data, text, displayText string, inputOption InputOption, fillInText string) *PostbackAction {
 	return &PostbackAction{
 		Label:       label,
 		Data:        data,
 		Text:        text,
 		DisplayText: displayText,
+		InputOption: inputOption,
+		FillInText:  fillInText,
 	}
 }
 


Test patch:
diff --git a/linebot/message_test.go b/linebot/message_test.go
index b9b73f9..93055d3 100644
--- a/linebot/message_test.go
+++ b/linebot/message_test.go
@@ -71,7 +71,7 @@ func TestMessageTypes(t *testing.T) {
 					"https://example.com/bot/images/image.jpg",
 					"",
 					"Please select",
-					NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
+					NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
 				),
 			),
 			Want: want{
diff --git a/linebot/send_message_test.go b/linebot/send_message_test.go
index 872618a..6ef54db 100644
--- a/linebot/send_message_test.go
+++ b/linebot/send_message_test.go
@@ -108,8 +108,10 @@ func TestPushMessages(t *testing.T) {
 						"https://example.com/bot/images/image.jpg",
 						"Menu",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionCloseRichMenu, ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenKeyboard, "text"),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					),
 				),
@@ -117,7 +119,7 @@ func TestPushMessages(t *testing.T) {
 			ResponseCode: 200,
 			Response:     []byte(`{}`),
 			Want: want{
-				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","thumbnailImageUrl":"https://example.com/bot/images/image.jpg","title":"Menu","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
+				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","thumbnailImageUrl":"https://example.com/bot/images/image.jpg","title":"Menu","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"closeRichMenu"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openKeyboard","fillInText":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
 				Response:    &BasicResponse{},
 			},
 		},
@@ -152,8 +154,10 @@ func TestPushMessages(t *testing.T) {
 						"",
 						"Menu",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenRichMenu, ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenKeyboard, "text"),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					),
 				),
@@ -161,7 +165,7 @@ func TestPushMessages(t *testing.T) {
 			ResponseCode: 200,
 			Response:     []byte(`{}`),
 			Want: want{
-				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","title":"Menu","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
+				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","title":"Menu","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openRichMenu"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openKeyboard","fillInText":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
 				Response:    &BasicResponse{},
 			},
 		},
@@ -174,8 +178,10 @@ func TestPushMessages(t *testing.T) {
 						"https://example.com/bot/images/image.jpg",
 						"",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenVoice, ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenKeyboard, "text"),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					),
 				),
@@ -183,7 +189,7 @@ func TestPushMessages(t *testing.T) {
 			ResponseCode: 200,
 			Response:     []byte(`{}`),
 			Want: want{
-				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","thumbnailImageUrl":"https://example.com/bot/images/image.jpg","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
+				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","thumbnailImageUrl":"https://example.com/bot/images/image.jpg","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openVoice"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openKeyboard","fillInText":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
 				Response:    &BasicResponse{},
 			},
 		},
@@ -196,8 +202,10 @@ func TestPushMessages(t *testing.T) {
 						"https://example.com/bot/images/image.jpg",
 						"",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenKeyboard, ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenKeyboard, "text"),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					).WithImageOptions("rectangle", "cover", "#FFFFFF"),
 				),
@@ -205,7 +213,7 @@ func TestPushMessages(t *testing.T) {
 			ResponseCode: 200,
 			Response:     []byte(`{}`),
 			Want: want{
-				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","thumbnailImageUrl":"https://example.com/bot/images/image.jpg","imageAspectRatio":"rectangle","imageSize":"cover","imageBackgroundColor":"#FFFFFF","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
+				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","thumbnailImageUrl":"https://example.com/bot/images/image.jpg","imageAspectRatio":"rectangle","imageSize":"cover","imageBackgroundColor":"#FFFFFF","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openKeyboard"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openKeyboard","fillInText":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
 				Response:    &BasicResponse{},
 			},
 		},
@@ -218,8 +226,9 @@ func TestPushMessages(t *testing.T) {
 						"",
 						"",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenKeyboard, "text"),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					),
 				),
@@ -227,7 +236,7 @@ func TestPushMessages(t *testing.T) {
 			ResponseCode: 200,
 			Response:     []byte(`{}`),
 			Want: want{
-				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
+				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a buttons template","template":{"type":"buttons","text":"Please select","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","displayText":"displayText"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","text":"text"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openKeyboard","fillInText":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/123"}]}}]}` + "\n"),
 				Response:    &BasicResponse{},
 			},
 		},
@@ -260,9 +269,10 @@ func TestPushMessages(t *testing.T) {
 							"https://example.com/bot/images/item1.jpg",
 							"this is menu",
 							"description",
-							NewPostbackAction("Buy", "action=buy&itemid=111", "", ""),
-							NewPostbackAction("Add to cart", "action=add&itemid=111", "", ""),
-							NewURIAction("View detail", "https://example.com/page/111"),
+							NewPostbackAction("Buy", "action=buy&itemid=111", "", "", "", ""),
+							NewPostbackAction("Add to cart", "action=add&itemid=111", "", "", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenKeyboard, "text"),
+						NewURIAction("View detail", "https://example.com/page/111"),
 						),
 					),
 				),
@@ -270,7 +280,7 @@ func TestPushMessages(t *testing.T) {
 			ResponseCode: 200,
 			Response:     []byte(`{}`),
 			Want: want{
-				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a carousel template","template":{"type":"carousel","columns":[{"thumbnailImageUrl":"https://example.com/bot/images/item1.jpg","title":"this is menu","text":"description","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=111"},{"type":"postback","label":"Add to cart","data":"action=add\u0026itemid=111"},{"type":"uri","label":"View detail","uri":"https://example.com/page/111"}]}]}}]}` + "\n"),
+				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a carousel template","template":{"type":"carousel","columns":[{"thumbnailImageUrl":"https://example.com/bot/images/item1.jpg","title":"this is menu","text":"description","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=111"},{"type":"postback","label":"Add to cart","data":"action=add\u0026itemid=111"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openKeyboard","fillInText":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/111"}]}]}}]}` + "\n"),
 				Response:    &BasicResponse{},
 			},
 		},
@@ -284,9 +294,10 @@ func TestPushMessages(t *testing.T) {
 							"https://example.com/bot/images/item1.jpg",
 							"this is menu",
 							"description",
-							NewPostbackAction("Buy", "action=buy&itemid=111", "", ""),
-							NewPostbackAction("Add to cart", "action=add&itemid=111", "", ""),
-							NewURIAction("View detail", "https://example.com/page/111"),
+							NewPostbackAction("Buy", "action=buy&itemid=111", "", "", "", ""),
+							NewPostbackAction("Add to cart", "action=add&itemid=111", "", "", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "", InputOptionOpenKeyboard, "text"),
+						NewURIAction("View detail", "https://example.com/page/111"),
 						).WithImageOptions("#FFFFFF"),
 					).WithImageOptions("rectangle", "cover"),
 				),
@@ -294,7 +305,7 @@ func TestPushMessages(t *testing.T) {
 			ResponseCode: 200,
 			Response:     []byte(`{}`),
 			Want: want{
-				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a carousel template with imageAspectRatio, imageSize and imageBackgroundColor","template":{"type":"carousel","columns":[{"thumbnailImageUrl":"https://example.com/bot/images/item1.jpg","imageBackgroundColor":"#FFFFFF","title":"this is menu","text":"description","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=111"},{"type":"postback","label":"Add to cart","data":"action=add\u0026itemid=111"},{"type":"uri","label":"View detail","uri":"https://example.com/page/111"}]}],"imageAspectRatio":"rectangle","imageSize":"cover"}}]}` + "\n"),
+				RequestBody: []byte(`{"to":"U0cc15697597f61dd8b01cea8b027050e","messages":[{"type":"template","altText":"this is a carousel template with imageAspectRatio, imageSize and imageBackgroundColor","template":{"type":"carousel","columns":[{"thumbnailImageUrl":"https://example.com/bot/images/item1.jpg","imageBackgroundColor":"#FFFFFF","title":"this is menu","text":"description","actions":[{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=111"},{"type":"postback","label":"Add to cart","data":"action=add\u0026itemid=111"},{"type":"postback","label":"Buy","data":"action=buy\u0026itemid=123","inputOption":"openKeyboard","fillInText":"text"},{"type":"uri","label":"View detail","uri":"https://example.com/page/111"}]}],"imageAspectRatio":"rectangle","imageSize":"cover"}}]}` + "\n"),
 				Response:    &BasicResponse{},
 			},
 		},
@@ -970,8 +981,8 @@ func TestBroadcastMessages(t *testing.T) {
 						"https://example.com/bot/images/image.jpg",
 						"Menu",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					),
 				),
@@ -1014,8 +1025,8 @@ func TestBroadcastMessages(t *testing.T) {
 						"",
 						"Menu",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					),
 				),
@@ -1036,8 +1047,8 @@ func TestBroadcastMessages(t *testing.T) {
 						"https://example.com/bot/images/image.jpg",
 						"",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					),
 				),
@@ -1058,8 +1069,8 @@ func TestBroadcastMessages(t *testing.T) {
 						"https://example.com/bot/images/image.jpg",
 						"",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					).WithImageOptions(
 						"rectangle",
@@ -1086,8 +1097,8 @@ func TestBroadcastMessages(t *testing.T) {
 						"",
 						"",
 						"Please select",
-						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText"),
-						NewPostbackAction("Buy", "action=buy&itemid=123", "text", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "", "displayText", "", ""),
+						NewPostbackAction("Buy", "action=buy&itemid=123", "text", "", "", ""),
 						NewURIAction("View detail", "https://example.com/page/123"),
 					),
 				),
@@ -1128,8 +1139,8 @@ func TestBroadcastMessages(t *testing.T) {
 							"https://example.com/bot/images/item1.jpg",
 							"this is menu",
 							"description",
-							NewPostbackAction("Buy", "action=buy&itemid=111", "", ""),
-							NewPostbackAction("Add to cart", "action=add&itemid=111", "", ""),
+							NewPostbackAction("Buy", "action=buy&itemid=111", "", "", "", ""),
+							NewPostbackAction("Add to cart", "action=add&itemid=111", "", "", "", ""),
 							NewURIAction("View detail", "https://example.com/page/111"),
 						),
 					),
@@ -1152,8 +1163,8 @@ func TestBroadcastMessages(t *testing.T) {
 							"https://example.com/bot/images/item1.jpg",
 							"this is menu",
 							"description",
-							NewPostbackAction("Buy", "action=buy&itemid=111", "", ""),
-							NewPostbackAction("Add to cart", "action=add&itemid=111", "", ""),
+							NewPostbackAction("Buy", "action=buy&itemid=111", "", "", "", ""),
+							NewPostbackAction("Add to cart", "action=add&itemid=111", "", "", "", ""),
 							NewURIAction("View detail", "https://example.com/page/111"),
 						).WithImageOptions(
 							"#FFFFFF",