|
|
@ -59,9 +59,6 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
|
|
|
if v.ResultCode == 0 {
|
|
|
|
if v.ResultCode == 0 {
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//supported terminal
|
|
|
|
|
|
|
|
for _, t := range pushTerminal {
|
|
|
|
|
|
|
|
if v.RecvPlatFormID == t {
|
|
|
|
|
|
|
|
//Use offline push messaging
|
|
|
|
//Use offline push messaging
|
|
|
|
var UIDList []string
|
|
|
|
var UIDList []string
|
|
|
|
UIDList = append(UIDList, v.RecvID)
|
|
|
|
UIDList = append(UIDList, v.RecvID)
|
|
|
@ -112,16 +109,14 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
|
|
|
if offlinePusher == nil {
|
|
|
|
if offlinePusher == nil {
|
|
|
|
offlinePusher = jpush.JPushClient
|
|
|
|
offlinePusher = jpush.JPushClient
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pushResult, err := offlinePusher.Push(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t), pushMsg.OperationID)
|
|
|
|
pushResult, err := offlinePusher.Push(UIDList, content, jsonCustomContent, pushMsg.OperationID)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.NewError(pushMsg.OperationID, "offline push error", pushMsg.String(), err.Error(), constant.PlatformIDToName(t))
|
|
|
|
log.NewError(pushMsg.OperationID, "offline push error", pushMsg.String(), err.Error())
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
log.NewDebug(pushMsg.OperationID, "offline push return result is ", pushResult, pushMsg.MsgData, constant.PlatformIDToName(t))
|
|
|
|
log.NewDebug(pushMsg.OperationID, "offline push return result is ", pushResult, pushMsg.MsgData)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|