diff --git a/config/config.yaml b/config/config.yaml index b82e75f71..6fb781604 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -225,7 +225,7 @@ push: pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end" enable: false # true or false (bool) getui: #个推推送 - pushUrl: "https://restapi.getui.com/v2/$appId" + pushUrl: masterSecret: "" appKey: "" intent: "" diff --git a/config/usualConfig.yaml b/config/usualConfig.yaml index 0c9388e0f..e2c720d2b 100644 --- a/config/usualConfig.yaml +++ b/config/usualConfig.yaml @@ -35,6 +35,7 @@ messageverify: push: getui: #个推推送 + pushUrl: "https://restapi.getui.com/v2/$appId" masterSecret: "" appKey: "" enable: false diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 6ec806e0b..1afebfa52 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -602,6 +602,7 @@ type usualConfig struct { Push struct { Getui struct { + PushUrl string `yaml:"pushUrl"` MasterSecret string `yaml:"masterSecret"` AppKey string `yaml:"appKey"` Enable bool `yaml:"enable"` @@ -698,8 +699,13 @@ func init() { if Config.Push.Getui.MasterSecret == "" { Config.Push.Getui.MasterSecret = UsualConfig.Push.Getui.MasterSecret + } + if Config.Push.Getui.AppKey == "" { Config.Push.Getui.AppKey = UsualConfig.Push.Getui.AppKey } + if Config.Push.Getui.PushUrl == "" { + Config.Push.Getui.PushUrl = UsualConfig.Push.Getui.PushUrl + } if Config.Push.Getui.Enable == nil { Config.Push.Getui.Enable = &UsualConfig.Push.Getui.Enable }