send msg file modify

pull/131/head
Gordon 3 years ago
parent ba249d294e
commit 33ae9dae0a

@ -13,14 +13,14 @@ import (
type JPushResp struct {
}
func JGAccountListPush(accounts []string, content, detailContent, platform string) ([]byte, error) {
func JGAccountListPush(accounts []string, alert, detailContent, platform string) ([]byte, error) {
var pf requestBody.Platform
_ = pf.SetPlatform(platform)
var au requestBody.Audience
au.SetAlias(accounts)
var no requestBody.Notification
no.SetAlert(content, platform)
no.SetAlert(alert, platform)
var me requestBody.Message
me.SetMsgContent(detailContent)
var o requestBody.Options

@ -93,6 +93,10 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
default:
content = constant.ContentType2PushContent[constant.Common]
}
if pushMsg.MsgData.OfflinePushInfo != nil {
content = pushMsg.MsgData.OfflinePushInfo.Title
}
pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t))
if err != nil {
log.NewError(pushMsg.OperationID, "offline push error", pushMsg.String(), err.Error(), constant.PlatformIDToName(t))

Loading…
Cancel
Save