SendUserMessage中限制钉钉消息长度的BUG
This commit is contained in:
@@ -31,7 +31,7 @@ func SendUserMessage(msgType, userID, title, content string) (err error) {
|
|||||||
for _, auth := range authList {
|
for _, auth := range authList {
|
||||||
if auth.Type == dingding.AuthTypeStaff || auth.Type == weixin.AuthTypeMP {
|
if auth.Type == dingding.AuthTypeStaff || auth.Type == weixin.AuthTypeMP {
|
||||||
findOneMethod = true
|
findOneMethod = true
|
||||||
if msgType == dingdingapi.MsgTypeMarkdown && len(content) > dingdingapi.MaxWorkContentLen {
|
if len(content) > dingdingapi.MaxWorkContentLen {
|
||||||
content = content[:dingdingapi.MaxWorkContentLen-4] + "..."
|
content = content[:dingdingapi.MaxWorkContentLen-4] + "..."
|
||||||
}
|
}
|
||||||
err = SendDDUserMessage(msgType, auth.AuthID, title, content)
|
err = SendDDUserMessage(msgType, auth.AuthID, title, content)
|
||||||
|
|||||||
Reference in New Issue
Block a user