From 0f0e1bb5a33f0a3a8a12f2eff1cc2c6bca20f5ff Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 15 Nov 2019 21:33:37 +0800 Subject: [PATCH] =?UTF-8?q?SendUserMessage=E4=B8=AD=E9=99=90=E5=88=B6?= =?UTF-8?q?=E9=92=89=E9=92=89=E6=B6=88=E6=81=AF=E9=95=BF=E5=BA=A6=E7=9A=84?= =?UTF-8?q?BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxutils/ddmsg/ddmsg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxutils/ddmsg/ddmsg.go b/business/jxutils/ddmsg/ddmsg.go index 5c1a3b6d3..5b855ab90 100644 --- a/business/jxutils/ddmsg/ddmsg.go +++ b/business/jxutils/ddmsg/ddmsg.go @@ -31,7 +31,7 @@ func SendUserMessage(msgType, userID, title, content string) (err error) { for _, auth := range authList { if auth.Type == dingding.AuthTypeStaff || auth.Type == weixin.AuthTypeMP { findOneMethod = true - if msgType == dingdingapi.MsgTypeMarkdown && len(content) > dingdingapi.MaxWorkContentLen { + if len(content) > dingdingapi.MaxWorkContentLen { content = content[:dingdingapi.MaxWorkContentLen-4] + "..." } err = SendDDUserMessage(msgType, auth.AuthID, title, content)