push modify

pull/103/head
Gordon 3 years ago
parent 85a75be30e
commit 8f483b498b

@ -123,6 +123,7 @@ push:
appKey: cf47465a368f24c659608e7e appKey: cf47465a368f24c659608e7e
masterSecret: 02204efe3f3832947a236ee5 masterSecret: 02204efe3f3832947a236ee5
pushUrl: "https://api.jpush.cn/v3/push" pushUrl: "https://api.jpush.cn/v3/push"
pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end"
manager: manager:
appManagerUid: ["openIM123456","openIM654321"] appManagerUid: ["openIM123456","openIM654321"]
secrets: ["openIM1","openIM2"] secrets: ["openIM1","openIM2"]

@ -1,6 +1,6 @@
package requestBody 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 { type Notification struct {
Alert string `json:"alert,omitempty"` Alert string `json:"alert,omitempty"`
@ -18,5 +18,5 @@ func (n *Notification) SetAlert(alert string) {
n.Alert = alert n.Alert = alert
} }
func (n *Notification) SetAndroidIntent() { func (n *Notification) SetAndroidIntent() {
n.Android.Intent = INTENT_URL n.Android.Intent = config.Config.Push.Jpns.PushIntent
} }

@ -122,6 +122,7 @@ type config struct {
AppKey string `yaml:"appKey"` AppKey string `yaml:"appKey"`
MasterSecret string `yaml:"masterSecret"` MasterSecret string `yaml:"masterSecret"`
PushUrl string `yaml:"pushUrl"` PushUrl string `yaml:"pushUrl"`
PushIntent string `yaml:"pushIntent"`
} }
} }
Manager struct { Manager struct {

Loading…
Cancel
Save