diff --git a/business/partner/im/im.go b/business/partner/im/im.go index 228c1adfc..0acfd5876 100644 --- a/business/partner/im/im.go +++ b/business/partner/im/im.go @@ -199,9 +199,12 @@ func ReadMsgFromVendor(vendorID int, elmAppID string, msg []byte) error { if vendorID == VendorIDMT { var PushContentReq = mtwmapi.PushContentReq{} err = json.Unmarshal(msg, &PushContentReq) - if FilterIm(PushContentReq.AppID, PushContentReq.MsgContent) { //自动回复消息过滤 - return nil + if len(PushContentReq.MsgContent) != 0 || PushContentReq.MsgContent != "" { + if FilterIm(PushContentReq.AppID, PushContentReq.MsgContent) { //自动回复消息过滤 + return nil + } } + jxMsg = &JXMsg{ SendType: SendTypeMt, MsgContent: PushContentReq, diff --git a/business/partner/purchase/mtwm/callback.go b/business/partner/purchase/mtwm/callback.go index 022c99183..22872f8f4 100644 --- a/business/partner/purchase/mtwm/callback.go +++ b/business/partner/purchase/mtwm/callback.go @@ -122,6 +122,7 @@ func GetMsgCallBackUrl(msgType, appId string) string { // OnImMsg im消息回调 func OnImMsg(msg *mtwmapi.ImCallbackMsg) (response *mtwmapi.CallbackResponse) { + if str, err := json.Marshal(msg.PushContent); err == nil { err = im.ReadMsgFromVendor(model.VendorIDMTWM, "", str) if err != nil {