File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,14 @@ const (
2323 SDKInvalidCorpID Error = "无效的 CorpID"
2424 // SDKAccessTokenInvalid 错误码:40014
2525 SDKAccessTokenInvalid Error = "AccessToken 无效"
26+ // SDKValidateSignatureFailed 错误码:40015
27+ SDKValidateSignatureFailed Error = "校验签名错误"
28+ // SDKDecryptMSGFailed 错误码:40016
29+ SDKDecryptMSGFailed Error = "消息解密失败"
2630 // SDKMediaIDExceedMinLength 错误码:40058
2731 SDKMediaIDExceedMinLength Error = "media_id 小于最小长度 1"
32+ // SDKContentContainsSensitiveInformation 错误码:40201
33+ SDKContentContainsSensitiveInformation Error = "当前客服账号由于涉及敏感信息,已被封禁,请联系企业微信客服处理"
2834 // SDKAccessTokenMissing 错误码:41001
2935 SDKAccessTokenMissing Error = "缺少AccessToken参数"
3036 // SDKAccessTokenExpired 错误码:42001
@@ -69,8 +75,14 @@ func NewSDKErr(code int, msgList ...string) Error {
6975 return SDKInvalidCorpID
7076 case 40014 :
7177 return SDKAccessTokenInvalid
78+ case 40015 :
79+ return SDKValidateSignatureFailed
80+ case 40016 :
81+ return SDKDecryptMSGFailed
7282 case 40058 :
7383 return SDKMediaIDExceedMinLength
84+ case 40201 :
85+ return SDKContentContainsSensitiveInformation
7486 case 45009 :
7587 return SDKApiFreqOutOfLimit
7688 case 48002 :
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ type Menu struct {
8383 MsgMenu struct {
8484 HeadContent string `json:"head_content"` // 消息内容,不多于1024字节
8585 List []interface {} `json:"list"` // 菜单项配置,不能多余10个
86- TailContent string `json:"tail_content"` // 结束文本, 不多于1024字
86+ TailContent string `json:"tail_content"` // 结束文本, 不多于1024字
8787 } `json:"msgmenu"`
8888}
8989
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ type Menu struct {
2222 MsgMenu struct {
2323 HeadContent string `json:"head_content"` // 消息内容,不多于1024字节
2424 List []interface {} `json:"list"` // 菜单项配置,不能多余10个
25- TailContent string `json:"tail_content"` // 结束文本, 不多于1024字
25+ TailContent string `json:"tail_content"` // 结束文本, 不多于1024字
2626 } `json:"msgmenu"`
2727}
2828
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ type EnterSessionEvent struct {
120120 ExternalUserID string `json:"external_userid"` // 客户UserID
121121 Scene string `json:"scene"` // 进入会话的场景值,获取客服帐号链接开发者自定义的场景值
122122 SceneParam string `json:"scene_param"` // 进入会话的自定义参数,获取客服帐号链接返回的url,开发者按规范拼接的scene_param参数
123- WelcomeCode string `json:"welcome_code"` // 如果满足发送欢迎语条件(条件为:1. 企业没有在管理端配置了原生欢迎语;2. 用户在过去48小时里未收过欢迎语,且未向该用户发过消息),会返回该字段。可用该welcome_code调用发送事件响应消息接口给客户发送欢迎语。
123+ WelcomeCode string `json:"welcome_code"` // 如果满足发送欢迎语条件(条件为:1. 企业没有在管理端配置了原生欢迎语;2. 用户在过去48小时里未收过欢迎语,且未向该用户发过消息),会返回该字段。可用该welcome_code调用发送事件响应消息接口给客户发送欢迎语。
124124 } `json:"event"` // 事件消息
125125}
126126
You can’t perform that action at this time.
0 commit comments