mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-13 13:35:59 +08:00
push modify
This commit is contained in:
@@ -3,12 +3,13 @@ package requestBody
|
|||||||
import "Open_IM/pkg/common/config"
|
import "Open_IM/pkg/common/config"
|
||||||
|
|
||||||
type Notification struct {
|
type Notification struct {
|
||||||
Alert string `json:"alert,omitempty"`
|
Alert string `json:"alert,omitempty"`
|
||||||
Android *Android `json:"android,omitempty"`
|
Android Android `json:"android,omitempty"`
|
||||||
IOS *Ios `json:"ios,omitempty"`
|
IOS Ios `json:"ios,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Android struct {
|
type Android struct {
|
||||||
|
Alert string `json:"alert,omitempty"`
|
||||||
Intent struct {
|
Intent struct {
|
||||||
URL string `json:"url,omitempty"`
|
URL string `json:"url,omitempty"`
|
||||||
} `json:"intent,omitempty"`
|
} `json:"intent,omitempty"`
|
||||||
@@ -18,6 +19,7 @@ type Ios struct {
|
|||||||
|
|
||||||
func (n *Notification) SetAlert(alert string) {
|
func (n *Notification) SetAlert(alert string) {
|
||||||
n.Alert = alert
|
n.Alert = alert
|
||||||
|
n.Android.Alert = alert
|
||||||
}
|
}
|
||||||
func (n *Notification) SetAndroidIntent() {
|
func (n *Notification) SetAndroidIntent() {
|
||||||
n.Android.Intent.URL = config.Config.Push.Jpns.PushIntent
|
n.Android.Intent.URL = config.Config.Push.Jpns.PushIntent
|
||||||
|
|||||||
Reference in New Issue
Block a user