@@ -115,24 +115,20 @@ func InitAPNSClient() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func pushNotification(notification RequestPushNotification) bool {
|
func pushNotification(notification RequestPushNotification) bool {
|
||||||
var (
|
|
||||||
success bool
|
|
||||||
)
|
|
||||||
|
|
||||||
switch notification.Platform {
|
switch notification.Platform {
|
||||||
case PlatFormIos:
|
case PlatFormIos:
|
||||||
if !PushConf.Ios.Enabled {
|
if !PushConf.Ios.Enabled {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
success = pushNotificationIos(notification)
|
go pushNotificationIos(notification)
|
||||||
case PlatFormAndroid:
|
case PlatFormAndroid:
|
||||||
if !PushConf.Android.Enabled {
|
if !PushConf.Android.Enabled {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
success = pushNotificationAndroid(notification)
|
go pushNotificationAndroid(notification)
|
||||||
}
|
}
|
||||||
|
|
||||||
return success
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// The iOS Notification Payload
|
// The iOS Notification Payload
|
||||||
|
|||||||
Reference in New Issue
Block a user