From d7f82196dce15f6ff05ca68aef60954e3500b2dc Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 12 Nov 2021 18:15:28 +0800 Subject: [PATCH] push modify --- internal/push/jpush/requestBody/notification.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/push/jpush/requestBody/notification.go b/internal/push/jpush/requestBody/notification.go index 2f386d3d3..838621606 100644 --- a/internal/push/jpush/requestBody/notification.go +++ b/internal/push/jpush/requestBody/notification.go @@ -3,12 +3,13 @@ package requestBody import "Open_IM/pkg/common/config" type Notification struct { - Alert string `json:"alert,omitempty"` - Android *Android `json:"android,omitempty"` - IOS *Ios `json:"ios,omitempty"` + Alert string `json:"alert,omitempty"` + Android Android `json:"android,omitempty"` + IOS Ios `json:"ios,omitempty"` } type Android struct { + Alert string `json:"alert,omitempty"` Intent struct { URL string `json:"url,omitempty"` } `json:"intent,omitempty"` @@ -18,6 +19,7 @@ type Ios struct { func (n *Notification) SetAlert(alert string) { n.Alert = alert + n.Android.Alert = alert } func (n *Notification) SetAndroidIntent() { n.Android.Intent.URL = config.Config.Push.Jpns.PushIntent