chore: fix Enabled config for iOS, Android and Huawei (#577)

Co-authored-by: Viktor Radchenko <1641795+vikmeup@users.noreply.github.com>
This commit is contained in:
kerem 2021-06-21 19:17:57 +03:00 committed by GitHub
parent fbedf3c82b
commit da4ca22d70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -323,17 +323,23 @@ func main() {
gorush.InitWorkers(ctx, wg, gorush.PushConf.Core.WorkerNum, gorush.PushConf.Core.QueueNum)
if gorush.PushConf.Ios.Enabled {
if err = gorush.InitAPNSClient(); err != nil {
gorush.LogError.Fatal(err)
}
}
if gorush.PushConf.Android.Enabled {
if _, err = gorush.InitFCMClient(gorush.PushConf.Android.APIKey); err != nil {
gorush.LogError.Fatal(err)
}
}
if gorush.PushConf.Huawei.Enabled {
if _, err = gorush.InitHMSClient(gorush.PushConf.Huawei.AppSecret, gorush.PushConf.Huawei.AppID); err != nil {
gorush.LogError.Fatal(err)
}
}
var g errgroup.Group