From 96f23e6b7ff4985185732aec46b86c7e31db046a Mon Sep 17 00:00:00 2001 From: zhaomingqiang Date: Mon, 9 May 2022 11:45:34 +0800 Subject: [PATCH] customer_bot send message, content -> card --- v2/customer_bot.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/v2/customer_bot.go b/v2/customer_bot.go index e2a481ae..1f9385e0 100644 --- a/v2/customer_bot.go +++ b/v2/customer_bot.go @@ -64,7 +64,8 @@ type customerBotSendMessageReq struct { Timestamp string `json:"timestamp,omitempty"` Sign string `json:"sign,omitempty"` MsgType string `json:"msg_type,omitempty"` - Content interface{} `json:"content"` + Content interface{} `json:"content,omitempty"` + Card interface{} `json:"card,omitempty"` } func (c *CustomerBot) sign(timestamp string) (string, error) { @@ -89,6 +90,14 @@ func (c *CustomerBot) newSendMessageReq(msgType string, content interface{}) (*c return nil, err } } + if msgType == "interactive" { + return &customerBotSendMessageReq{ + Timestamp: timestamp, + Sign: sign, + MsgType: msgType, + Card: content, + }, nil + } return &customerBotSendMessageReq{ Timestamp: timestamp, Sign: sign,