Files
open-im-server/internal/push/jpush/requestBody/notification.go
T

23 lines
532 B
Go
Raw Normal View History

package requestBody
2021-11-12 16:09:21 +08:00
const INTENT_URL = "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end"
type Notification struct {
Alert string `json:"alert,omitempty"`
Android *Android `json:"android,omitempty"`
IOS *Ios `json:"ios,omitempty"`
}
type Android struct {
2021-11-12 16:09:21 +08:00
Intent string `json:"intent,omitempty"`
}
type Ios struct {
}
func (n *Notification) SetAlert(alert string) {
n.Alert = alert
}
2021-11-12 16:09:21 +08:00
func (n *Notification) SetAndroidIntent() {
n.Android.Intent = INTENT_URL
}