set ios and android as disabled mode.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2016-03-27 21:07:11 +08:00
parent 2e0673a32d
commit 59beeb7183
4 changed files with 15 additions and 4 deletions

View File

@@ -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

View File

@@ -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)
}