mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 03:26:57 +08:00
fcm ios push badge
This commit is contained in:
parent
72aff32024
commit
f6137dfc34
@ -90,6 +90,7 @@ func (f *Fcm) Push(accounts []string, title, detailContent, operationID string,
|
|||||||
}
|
}
|
||||||
for _, token := range personTokens {
|
for _, token := range personTokens {
|
||||||
temp := &messaging.Message{
|
temp := &messaging.Message{
|
||||||
|
Data: map[string]string{"ex": opts.Data},
|
||||||
Token: token,
|
Token: token,
|
||||||
Notification: notification,
|
Notification: notification,
|
||||||
APNS: apns,
|
APNS: apns,
|
||||||
|
@ -300,6 +300,7 @@ func GetOfflinePushOpts(pushMsg *pbPush.PushMsgReq) (opts push.PushOpts, err err
|
|||||||
if pushMsg.MsgData.OfflinePushInfo != nil {
|
if pushMsg.MsgData.OfflinePushInfo != nil {
|
||||||
opts.IOSBadgeCount = pushMsg.MsgData.OfflinePushInfo.IOSBadgeCount
|
opts.IOSBadgeCount = pushMsg.MsgData.OfflinePushInfo.IOSBadgeCount
|
||||||
opts.IOSPushSound = pushMsg.MsgData.OfflinePushInfo.IOSPushSound
|
opts.IOSPushSound = pushMsg.MsgData.OfflinePushInfo.IOSPushSound
|
||||||
|
opts.Data = pushMsg.MsgData.OfflinePushInfo.Ex
|
||||||
}
|
}
|
||||||
|
|
||||||
return opts, nil
|
return opts, nil
|
||||||
|
@ -12,6 +12,7 @@ type PushOpts struct {
|
|||||||
Signal Signal
|
Signal Signal
|
||||||
IOSPushSound string
|
IOSPushSound string
|
||||||
IOSBadgeCount bool
|
IOSBadgeCount bool
|
||||||
|
Data string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Signal struct {
|
type Signal struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user