Skip to content

Commit a593481

Browse files
casonlivissong
authored andcommitted
interaction/search: sdK:修改 interaction 对象 (merge request !48)
Squash merge branch 'origin/feature_20220419_casonli_interaction_story_873779963' into 'master' 修改 interaction 对象 --issue=1
1 parent 26840cb commit a593481

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

dto/keyboard/keyboard.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package keyboard
22

3+
// ActionType 按钮操作类型
34
type ActionType uint32
5+
6+
// PermissionType 按钮的权限类型
47
type PermissionType uint32
58

69
const (

dto/message_create.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import "github.com/tencent-connect/botgo/dto/keyboard"
44

55
// MessageToCreate 发送消息结构体定义
66
type MessageToCreate struct {
7-
Content string `json:"content,omitempty"`
8-
Embed *Embed `json:"embed,omitempty"`
9-
Ark *Ark `json:"ark,omitempty"`
10-
Image string `json:"image,omitempty"`
11-
MsgID string `json:"msg_id,omitempty"` // 要回复的消息id,为空是主动消息,公域机器人会异步审核,不为空是被动消息,公域机器人会校验语料
7+
Content string `json:"content,omitempty"`
8+
Embed *Embed `json:"embed,omitempty"`
9+
Ark *Ark `json:"ark,omitempty"`
10+
Image string `json:"image,omitempty"`
11+
// 要回复的消息id,为空是主动消息,公域机器人会异步审核,不为空是被动消息,公域机器人会校验语料
12+
MsgID string `json:"msg_id,omitempty"`
1213
MessageReference *MessageReference `json:"message_reference,omitempty"`
1314
Markdown *Markdown `json:"markdown,omitempty"`
1415
Keyboard *keyboard.MessageKeyboard `json:"keyboard,omitempty"` // 消息按钮组件

interaction/search/simulate_search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const maxRespBuffer = 65535
1818

1919
// Config 搜索请求配置
2020
type Config struct {
21-
AppID uint64
21+
AppID string
2222
EndPoint string // 回调url地址
2323
Secret string
2424
}

interaction/search/simulate_search_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
func TestSimulateSearch(t *testing.T) {
1010
got, err := SimulateSearch(
1111
&Config{
12-
AppID: 1,
12+
AppID: "1",
1313
EndPoint: "https://www.qq.com",
1414
Secret: "a",
1515
}, "hello",

0 commit comments

Comments
 (0)