fcm ios push badge

pull/351/head
Gordon 2 years ago
parent 72aff32024
commit f6137dfc34

@ -90,6 +90,7 @@ func (f *Fcm) Push(accounts []string, title, detailContent, operationID string,
}
for _, token := range personTokens {
temp := &messaging.Message{
Data: map[string]string{"ex": opts.Data},
Token: token,
Notification: notification,
APNS: apns,

@ -300,6 +300,7 @@ func GetOfflinePushOpts(pushMsg *pbPush.PushMsgReq) (opts push.PushOpts, err err
if pushMsg.MsgData.OfflinePushInfo != nil {
opts.IOSBadgeCount = pushMsg.MsgData.OfflinePushInfo.IOSBadgeCount
opts.IOSPushSound = pushMsg.MsgData.OfflinePushInfo.IOSPushSound
opts.Data = pushMsg.MsgData.OfflinePushInfo.Ex
}
return opts, nil

@ -12,6 +12,7 @@ type PushOpts struct {
Signal Signal
IOSPushSound string
IOSBadgeCount bool
Data string
}
type Signal struct {

Loading…
Cancel
Save