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:
parent
fbedf3c82b
commit
da4ca22d70
18
main.go
18
main.go
|
@ -323,16 +323,22 @@ func main() {
|
||||||
|
|
||||||
gorush.InitWorkers(ctx, wg, gorush.PushConf.Core.WorkerNum, gorush.PushConf.Core.QueueNum)
|
gorush.InitWorkers(ctx, wg, gorush.PushConf.Core.WorkerNum, gorush.PushConf.Core.QueueNum)
|
||||||
|
|
||||||
if err = gorush.InitAPNSClient(); err != nil {
|
if gorush.PushConf.Ios.Enabled {
|
||||||
gorush.LogError.Fatal(err)
|
if err = gorush.InitAPNSClient(); err != nil {
|
||||||
|
gorush.LogError.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err = gorush.InitFCMClient(gorush.PushConf.Android.APIKey); err != nil {
|
if gorush.PushConf.Android.Enabled {
|
||||||
gorush.LogError.Fatal(err)
|
if _, err = gorush.InitFCMClient(gorush.PushConf.Android.APIKey); err != nil {
|
||||||
|
gorush.LogError.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err = gorush.InitHMSClient(gorush.PushConf.Huawei.AppSecret, gorush.PushConf.Huawei.AppID); err != nil {
|
if gorush.PushConf.Huawei.Enabled {
|
||||||
gorush.LogError.Fatal(err)
|
if _, err = gorush.InitHMSClient(gorush.PushConf.Huawei.AppSecret, gorush.PushConf.Huawei.AppID); err != nil {
|
||||||
|
gorush.LogError.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var g errgroup.Group
|
var g errgroup.Group
|
||||||
|
|
Loading…
Reference in New Issue