@@ -220,7 +220,7 @@ func iosAlertDictionary(payload *payload.Payload, req PushNotification) *payload
|
|||||||
func GetIOSNotification(req PushNotification) *apns.Notification {
|
func GetIOSNotification(req PushNotification) *apns.Notification {
|
||||||
notification := &apns.Notification{
|
notification := &apns.Notification{
|
||||||
ApnsID: req.ApnsID,
|
ApnsID: req.ApnsID,
|
||||||
Topic: req.Topic,
|
Topic: req.Topic,
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Expiration > 0 {
|
if req.Expiration > 0 {
|
||||||
@@ -303,13 +303,13 @@ func PushToIOS(req PushNotification) bool {
|
|||||||
// https://developers.google.com/cloud-messaging/http-server-ref
|
// https://developers.google.com/cloud-messaging/http-server-ref
|
||||||
func GetAndroidNotification(req PushNotification) gcm.HttpMessage {
|
func GetAndroidNotification(req PushNotification) gcm.HttpMessage {
|
||||||
notification := gcm.HttpMessage{
|
notification := gcm.HttpMessage{
|
||||||
To: req.To,
|
To: req.To,
|
||||||
CollapseKey: req.CollapseKey,
|
CollapseKey: req.CollapseKey,
|
||||||
ContentAvailable: req.ContentAvailable,
|
ContentAvailable: req.ContentAvailable,
|
||||||
DelayWhileIdle: req.DelayWhileIdle,
|
DelayWhileIdle: req.DelayWhileIdle,
|
||||||
TimeToLive: req.TimeToLive,
|
TimeToLive: req.TimeToLive,
|
||||||
RestrictedPackageName: req.RestrictedPackageName,
|
RestrictedPackageName: req.RestrictedPackageName,
|
||||||
DryRun: req.DryRun,
|
DryRun: req.DryRun,
|
||||||
}
|
}
|
||||||
|
|
||||||
notification.RegistrationIds = req.Tokens
|
notification.RegistrationIds = req.Tokens
|
||||||
|
|||||||
Reference in New Issue
Block a user