notification modify

This commit is contained in:
Gordon
2021-11-12 16:09:21 +08:00
parent 4b13874d44
commit 85a75be30e
2 changed files with 7 additions and 1 deletions
@@ -1,5 +1,7 @@
package requestBody
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"`
@@ -7,11 +9,14 @@ type Notification struct {
}
type Android struct {
Intent string `json:"intent,omitempty"`
}
type Ios struct {
}
func (n *Notification) SetAlert(alert string) {
n.Alert = alert
}
func (n *Notification) SetAndroidIntent() {
n.Android.Intent = INTENT_URL
}