Skip to content

Commit

Permalink
interaction/search: sdK:修改 interaction 对象 (merge request !48)
Browse files Browse the repository at this point in the history
Squash merge branch 'origin/feature_20220419_casonli_interaction_story_873779963' into 'master'
修改 interaction 对象

--issue=1
  • Loading branch information
casonli authored and vissong committed May 14, 2022
1 parent 26840cb commit a593481
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions dto/keyboard/keyboard.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package keyboard

// ActionType 按钮操作类型
type ActionType uint32

// PermissionType 按钮的权限类型
type PermissionType uint32

const (
Expand Down
11 changes: 6 additions & 5 deletions dto/message_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import "github.com/tencent-connect/botgo/dto/keyboard"

// MessageToCreate 发送消息结构体定义
type MessageToCreate struct {
Content string `json:"content,omitempty"`
Embed *Embed `json:"embed,omitempty"`
Ark *Ark `json:"ark,omitempty"`
Image string `json:"image,omitempty"`
MsgID string `json:"msg_id,omitempty"` // 要回复的消息id,为空是主动消息,公域机器人会异步审核,不为空是被动消息,公域机器人会校验语料
Content string `json:"content,omitempty"`
Embed *Embed `json:"embed,omitempty"`
Ark *Ark `json:"ark,omitempty"`
Image string `json:"image,omitempty"`
// 要回复的消息id,为空是主动消息,公域机器人会异步审核,不为空是被动消息,公域机器人会校验语料
MsgID string `json:"msg_id,omitempty"`
MessageReference *MessageReference `json:"message_reference,omitempty"`
Markdown *Markdown `json:"markdown,omitempty"`
Keyboard *keyboard.MessageKeyboard `json:"keyboard,omitempty"` // 消息按钮组件
Expand Down
2 changes: 1 addition & 1 deletion interaction/search/simulate_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const maxRespBuffer = 65535

// Config 搜索请求配置
type Config struct {
AppID uint64
AppID string
EndPoint string // 回调url地址
Secret string
}
Expand Down
2 changes: 1 addition & 1 deletion interaction/search/simulate_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func TestSimulateSearch(t *testing.T) {
got, err := SimulateSearch(
&Config{
AppID: 1,
AppID: "1",
EndPoint: "https://www.qq.com",
Secret: "a",
}, "hello",
Expand Down

0 comments on commit a593481

Please sign in to comment.