Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -199,9 +199,12 @@ func ReadMsgFromVendor(vendorID int, elmAppID string, msg []byte) error {
|
|||||||
if vendorID == VendorIDMT {
|
if vendorID == VendorIDMT {
|
||||||
var PushContentReq = mtwmapi.PushContentReq{}
|
var PushContentReq = mtwmapi.PushContentReq{}
|
||||||
err = json.Unmarshal(msg, &PushContentReq)
|
err = json.Unmarshal(msg, &PushContentReq)
|
||||||
if FilterIm(PushContentReq.AppID, PushContentReq.MsgContent) { //自动回复消息过滤
|
if len(PushContentReq.MsgContent) != 0 || PushContentReq.MsgContent != "" {
|
||||||
return nil
|
if FilterIm(PushContentReq.AppID, PushContentReq.MsgContent) { //自动回复消息过滤
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jxMsg = &JXMsg{
|
jxMsg = &JXMsg{
|
||||||
SendType: SendTypeMt,
|
SendType: SendTypeMt,
|
||||||
MsgContent: PushContentReq,
|
MsgContent: PushContentReq,
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ func GetMsgCallBackUrl(msgType, appId string) string {
|
|||||||
|
|
||||||
// OnImMsg im消息回调
|
// OnImMsg im消息回调
|
||||||
func OnImMsg(msg *mtwmapi.ImCallbackMsg) (response *mtwmapi.CallbackResponse) {
|
func OnImMsg(msg *mtwmapi.ImCallbackMsg) (response *mtwmapi.CallbackResponse) {
|
||||||
|
|
||||||
if str, err := json.Marshal(msg.PushContent); err == nil {
|
if str, err := json.Marshal(msg.PushContent); err == nil {
|
||||||
err = im.ReadMsgFromVendor(model.VendorIDMTWM, "", str)
|
err = im.ReadMsgFromVendor(model.VendorIDMTWM, "", str)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user