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
6
main.go
6
main.go
|
@ -323,17 +323,23 @@ 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 gorush.PushConf.Ios.Enabled {
|
||||||
if err = gorush.InitAPNSClient(); err != nil {
|
if err = gorush.InitAPNSClient(); err != nil {
|
||||||
gorush.LogError.Fatal(err)
|
gorush.LogError.Fatal(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if gorush.PushConf.Android.Enabled {
|
||||||
if _, err = gorush.InitFCMClient(gorush.PushConf.Android.APIKey); err != nil {
|
if _, err = gorush.InitFCMClient(gorush.PushConf.Android.APIKey); err != nil {
|
||||||
gorush.LogError.Fatal(err)
|
gorush.LogError.Fatal(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if gorush.PushConf.Huawei.Enabled {
|
||||||
if _, err = gorush.InitHMSClient(gorush.PushConf.Huawei.AppSecret, gorush.PushConf.Huawei.AppID); err != nil {
|
if _, err = gorush.InitHMSClient(gorush.PushConf.Huawei.AppSecret, gorush.PushConf.Huawei.AppID); err != nil {
|
||||||
gorush.LogError.Fatal(err)
|
gorush.LogError.Fatal(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var g errgroup.Group
|
var g errgroup.Group
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue