From 8f483b498b3c3782926d27cba6b4816ed4c96fee Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 12 Nov 2021 17:25:17 +0800 Subject: [PATCH] push modify --- config/config.yaml | 1 + internal/push/jpush/requestBody/notification.go | 4 ++-- pkg/common/config/config.go | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index e65f23926..c4b0e49fc 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -123,6 +123,7 @@ push: appKey: cf47465a368f24c659608e7e masterSecret: 02204efe3f3832947a236ee5 pushUrl: "https://api.jpush.cn/v3/push" + pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end" manager: appManagerUid: ["openIM123456","openIM654321"] secrets: ["openIM1","openIM2"] diff --git a/internal/push/jpush/requestBody/notification.go b/internal/push/jpush/requestBody/notification.go index bbb4bb927..09aae6020 100644 --- a/internal/push/jpush/requestBody/notification.go +++ b/internal/push/jpush/requestBody/notification.go @@ -1,6 +1,6 @@ package requestBody -const INTENT_URL = "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end" +import "Open_IM/pkg/common/config" type Notification struct { Alert string `json:"alert,omitempty"` @@ -18,5 +18,5 @@ func (n *Notification) SetAlert(alert string) { n.Alert = alert } func (n *Notification) SetAndroidIntent() { - n.Android.Intent = INTENT_URL + n.Android.Intent = config.Config.Push.Jpns.PushIntent } diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 6f5723591..e5d6996a2 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -122,6 +122,7 @@ type config struct { AppKey string `yaml:"appKey"` MasterSecret string `yaml:"masterSecret"` PushUrl string `yaml:"pushUrl"` + PushIntent string `yaml:"pushIntent"` } } Manager struct {