send msg file modify

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

@ -13,14 +13,14 @@ import (
type JPushResp struct { 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 var pf requestBody.Platform
_ = pf.SetPlatform(platform) _ = pf.SetPlatform(platform)
var au requestBody.Audience var au requestBody.Audience
au.SetAlias(accounts) au.SetAlias(accounts)
var no requestBody.Notification var no requestBody.Notification
no.SetAlert(content, platform) no.SetAlert(alert, platform)
var me requestBody.Message var me requestBody.Message
me.SetMsgContent(detailContent) me.SetMsgContent(detailContent)
var o requestBody.Options var o requestBody.Options

@ -93,6 +93,10 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
default: default:
content = constant.ContentType2PushContent[constant.Common] 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)) pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t))
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(), constant.PlatformIDToName(t))

Loading…
Cancel
Save