diff --git a/config/config.yaml b/config/config.yaml index 923b95591..617d5b557 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -261,6 +261,7 @@ messageverify: iospush: pushSound: "xxx" badgeCount: true + production: true callback: # callback url 需要自行更换callback url diff --git a/internal/push/jpush/push.go b/internal/push/jpush/push.go index 833174de5..060b11d78 100644 --- a/internal/push/jpush/push.go +++ b/internal/push/jpush/push.go @@ -51,7 +51,7 @@ func (j *JPush) Push(accounts []string, alert, detailContent, operationID string var me requestBody.Message me.SetMsgContent(detailContent) var o requestBody.Options - o.SetApnsProduction(false) + o.SetApnsProduction(config.Config.IOSPush.Production) var po requestBody.PushObj po.SetPlatform(&pf) po.SetAudience(&au) diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 2163e7619..9f6b4ba18 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -238,6 +238,7 @@ type config struct { IOSPush struct { PushSound string `yaml:"pushSound"` BadgeCount bool `yaml:"badgeCount"` + Production bool `yaml:"production"` } Callback struct {