set ios and android as disabled mode.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -48,10 +48,10 @@ func BuildDefaultPushConf() ConfYaml {
|
||||
|
||||
// Android
|
||||
conf.Android.ApiKey = ""
|
||||
conf.Android.Enabled = true
|
||||
conf.Android.Enabled = false
|
||||
|
||||
// iOS
|
||||
conf.Ios.Enabled = true
|
||||
conf.Ios.Enabled = false
|
||||
conf.Ios.PemCertPath = "cert.pem"
|
||||
conf.Ios.PemKeyPath = "key.pem"
|
||||
conf.Ios.Production = false
|
||||
|
||||
@@ -86,8 +86,14 @@ func pushNotification(notification RequestPushNotification) bool {
|
||||
|
||||
switch notification.Platform {
|
||||
case PlatFormIos:
|
||||
if !PushConf.Ios.Enabled {
|
||||
return false
|
||||
}
|
||||
success = pushNotificationIos(notification)
|
||||
case PlatFormAndroid:
|
||||
if !PushConf.Android.Enabled {
|
||||
return false
|
||||
}
|
||||
success = pushNotificationAndroid(notification)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user