diff --git a/SDK/auth/authorization_test.go b/SDK/auth/authorization_test.go index ebb4e25..bbc4816 100644 --- a/SDK/auth/authorization_test.go +++ b/SDK/auth/authorization_test.go @@ -249,6 +249,7 @@ func TestAutoDisableTenantToken(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) diff --git a/SDK/message/card_builder_test.go b/SDK/message/card_builder_test.go index 9108458..9c4c3d8 100644 --- a/SDK/message/card_builder_test.go +++ b/SDK/message/card_builder_test.go @@ -31,6 +31,7 @@ func TestCardAsyncButton(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) //add block @@ -81,6 +82,7 @@ func TestCardSyncButton(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) @@ -132,6 +134,7 @@ func TestCardJumpButton(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) //add block @@ -172,6 +175,7 @@ func TestCardImage(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) //add block @@ -215,6 +219,7 @@ func TestCardSelectStaticMenu(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) //add block @@ -265,6 +270,7 @@ func TestCardSelectPersonMenu(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) //add block @@ -308,6 +314,7 @@ func TestCardOverFlowMenu(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) //add block @@ -356,6 +363,7 @@ func TestCardDatePicker(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) //add block diff --git a/SDK/message/message_test.go b/SDK/message/message_test.go index a05a67e..e8c1919 100644 --- a/SDK/message/message_test.go +++ b/SDK/message/message_test.go @@ -152,6 +152,7 @@ func TestSendCardMessage(t *testing.T) { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) @@ -356,9 +357,11 @@ func TestBatchSendCardMessage(t *testing.T) { url := "https://www.google.com" content := "card message test" card := protocol.CardForm{ - Config: &protocol.ConfigForm{MinVersion: protocol.VersionForm{Version: "1.0"}, + Config: &protocol.ConfigForm{ + MinVersion: protocol.VersionForm{Version: "1.0"}, Debug: true, WideScreenMode: true, + EnableForward: false, }, CardLink: &protocol.URLForm{ Url: &url, diff --git a/SDK/protocol/card_element.go b/SDK/protocol/card_element.go index 2ecdee8..a8d37fc 100644 --- a/SDK/protocol/card_element.go +++ b/SDK/protocol/card_element.go @@ -341,6 +341,7 @@ type ConfigForm struct { MinVersion VersionForm `json:"min_version,omitempty" validate:"omitempty"` Debug bool `json:"debug,omitempty" validate:"omitempty"` WideScreenMode bool `json:"wide_screen_mode,omitempty" validate:"omitempty"` + EnableForward bool `json:"enable_forward,omitempty" validate:"omitempty"` } type VersionForm struct { diff --git a/demo/bot_receive_and_response/bot_receive_and_response.go b/demo/bot_receive_and_response/bot_receive_and_response.go index 865a059..78aa6de 100644 --- a/demo/bot_receive_and_response/bot_receive_and_response.go +++ b/demo/bot_receive_and_response/bot_receive_and_response.go @@ -142,6 +142,7 @@ func BotRecvMsgCard(ctx context.Context, msg *protocol.BotRecvMsg) error { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) @@ -192,6 +193,7 @@ func ActionClickButton(ctx context.Context, callback *protocol.CardCallbackForm) config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) diff --git a/demo/send_card/send_card.go b/demo/send_card/send_card.go index c3102da..9cd7506 100644 --- a/demo/send_card/send_card.go +++ b/demo/send_card/send_card.go @@ -54,6 +54,7 @@ func sendCard(chatID, tenantKey, appID string) error { config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) diff --git a/docs/us/send_card.md b/docs/us/send_card.md index 35c33b9..56296cc 100644 --- a/docs/us/send_card.md +++ b/docs/us/send_card.md @@ -21,6 +21,7 @@ builder := &message.CardBuilder{} config := protocol.ConfigForm{ MinVersion: protocol.VersionForm{}, WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) ``` @@ -250,9 +251,10 @@ func UpdateCard(token, tenantkey, appid string, openid []string) error { builder := &message.CardBuilder{} //add config config := protocol.ConfigForm{ - MinVersion: protocol.VersionForm{}, - WideScreenMode: true, - } + MinVersion: protocol.VersionForm{}, + WideScreenMode: true, + EnableForward: false, + } builder.SetConfig(config) //add header diff --git a/docs/us/webhook_card.md b/docs/us/webhook_card.md index 878e17d..7d679a5 100644 --- a/docs/us/webhook_card.md +++ b/docs/us/webhook_card.md @@ -75,8 +75,9 @@ func BotRecvMsgCard(ctx context.Context, msg *protocol.BotRecvMsg) error { builder := &message.CardBuilder{} //add config config := protocol.ConfigForm{ - MinVersion: protocol.VersionForm{}, - WideScreenMode: true, + MinVersion: protocol.VersionForm{}, + WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) @@ -131,8 +132,9 @@ func ActionClickButton(ctx context.Context, callback *protocol.CardCallbackForm) //add config config := protocol.ConfigForm{ - MinVersion: protocol.VersionForm{}, - WideScreenMode: true, + MinVersion: protocol.VersionForm{}, + WideScreenMode: true, + EnableForward: false, } builder.SetConfig(config) diff --git a/docs/zh/send_card.md b/docs/zh/send_card.md index a2c3d2f..b85da64 100644 --- a/docs/zh/send_card.md +++ b/docs/zh/send_card.md @@ -17,9 +17,11 @@ builder := &message.CardBuilder{} 2. 添加和配置 config ```go //add config -config := protocol.ConfigForm{ - MinVersion: protocol.VersionForm{}, - WideScreenMode: true, +type ConfigForm struct { + MinVersion VersionForm `json:"min_version,omitempty" validate:"omitempty"` + Debug bool `json:"debug,omitempty" validate:"omitempty"` + WideScreenMode bool `json:"wide_screen_mode,omitempty" validate:"omitempty"` + EnableForward bool `json:"enable_forward,omitempty" validate:"omitempty"` } builder.SetConfig(config) ``` @@ -236,9 +238,10 @@ func UpdateCard(token, tenantkey, appid string, openid []string) error { builder := &message.CardBuilder{} //add config config := protocol.ConfigForm{ - MinVersion: protocol.VersionForm{}, - WideScreenMode: true, - } + MinVersion: protocol.VersionForm{}, + WideScreenMode: true, + EnableForward: false, + } builder.SetConfig(config) //add header diff --git a/docs/zh/webhook_card.md b/docs/zh/webhook_card.md index 38bb090..e4b7d12 100644 --- a/docs/zh/webhook_card.md +++ b/docs/zh/webhook_card.md @@ -86,9 +86,10 @@ func BotRecvMsgCard(ctx context.Context, msg *protocol.BotRecvMsg) error { builder := &message.CardBuilder{} //add config config := protocol.ConfigForm{ - MinVersion: protocol.VersionForm{}, - WideScreenMode: true, - } + MinVersion: protocol.VersionForm{}, + WideScreenMode: true, + EnableForward: false, + } builder.SetConfig(config) //add header @@ -144,9 +145,10 @@ func ActionClickButton(ctx context.Context, callback *protocol.CardCallbackForm) //add config config := protocol.ConfigForm{ - MinVersion: protocol.VersionForm{}, - WideScreenMode: true, - } + MinVersion: protocol.VersionForm{}, + WideScreenMode: true, + EnableForward: false, + } builder.SetConfig(config) //add header