fix bug :pushMsg.MsgData.OfflinePushInfo==nil

This commit is contained in:
skiffer-git
2022-09-01 21:58:22 +08:00
parent ac2cc154b4
commit e990118475
3 changed files with 20 additions and 2 deletions
+5 -2
View File
@@ -297,8 +297,11 @@ func GetOfflinePushOpts(pushMsg *pbPush.PushMsgReq) (opts push.PushOpts, err err
log.NewDebug(pushMsg.OperationID, opts)
}
}
opts.IOSBadgeCount = pushMsg.MsgData.OfflinePushInfo.IOSBadgeCount
opts.IOSPushSound = pushMsg.MsgData.OfflinePushInfo.IOSPushSound
if pushMsg.MsgData.OfflinePushInfo != nil {
opts.IOSBadgeCount = pushMsg.MsgData.OfflinePushInfo.IOSBadgeCount
opts.IOSPushSound = pushMsg.MsgData.OfflinePushInfo.IOSPushSound
}
return opts, nil
}