+ CorpAsyncSendMarkdown
This commit is contained in:
@@ -7,6 +7,17 @@ const (
|
||||
MaxWorkContentLen = MaxWorkMsgLen - 96
|
||||
)
|
||||
|
||||
const (
|
||||
MsgTyeText = "txt"
|
||||
MsgTypeImage = "image"
|
||||
MsgTypeVoice = "voice"
|
||||
MsgTypeFile = "file"
|
||||
MsgTypeLink = "link"
|
||||
MsgTypeOA = "oa"
|
||||
MsgTypeMarkdown = "markdown"
|
||||
MsgTypeActionCard = "action_card"
|
||||
)
|
||||
|
||||
func (a *API) CorpAsyncSend(userIDList, deptIDList []string, isToAllUser bool, msg map[string]interface{}) (err error) {
|
||||
params := map[string]interface{}{
|
||||
"agent_id": a.agentID,
|
||||
@@ -33,3 +44,13 @@ func (a *API) CorpAsyncSendSimple(userID, content string) (err error) {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func (a *API) CorpAsyncSendMarkdown(userIDList, deptIDList []string, isToAllUser bool, title, content string) (err error) {
|
||||
return a.CorpAsyncSend(userIDList, deptIDList, isToAllUser, map[string]interface{}{
|
||||
"msgtype": "markdown",
|
||||
"markdown": map[string]interface{}{
|
||||
"title": title,
|
||||
"text": content,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user