mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-11 03:33:53 +08:00
v2.0
This commit is contained in:
21
server/internal/library/notify/feishu/interactive.go
Normal file
21
server/internal/library/notify/feishu/interactive.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package feishu
|
||||
|
||||
type InteractiveMessage struct {
|
||||
MsgType MsgType `json:"msg_type"`
|
||||
Card string `json:"card"`
|
||||
}
|
||||
|
||||
func (m *InteractiveMessage) Body() map[string]interface{} {
|
||||
m.MsgType = MsgTypeInteractive
|
||||
return structToMap(m)
|
||||
}
|
||||
|
||||
func NewInteractiveMessage() *InteractiveMessage {
|
||||
return &InteractiveMessage{}
|
||||
}
|
||||
|
||||
// SetCard set card with cardbuilder https://open.feishu.cn/tool/cardbuilder?from=custom_bot_doc
|
||||
func (m *InteractiveMessage) SetCard(card string) *InteractiveMessage {
|
||||
m.Card = card
|
||||
return m
|
||||
}
|
||||
Reference in New Issue
Block a user