Verified Commit f0e43f0f authored by Cui's avatar Cui

add prop for app

parent 8ba3d18d
......@@ -61,6 +61,20 @@ func AppMessageSender(am AppMessage, appKey, masterSecret string, iosProduction
iosNotification.AddExtra("messageId", am.Extra.MessageId)
}
androidNotification.AddExtra("jumpType", am.Extra.JumpType)
androidNotification.AddExtra("jumpPage", am.Extra.JumpPage)
androidNotification.AddExtra("jumpUrl", am.Extra.JumpUrl)
androidNotification.AddExtra("jumpTag", am.Extra.JumpTag)
androidNotification.AddExtra("channelId", am.Extra.ChannelId)
androidNotification.AddExtra("channelGroupId", am.Extra.ChannelGroupId)
iosNotification.AddExtra("jumpType", am.Extra.JumpType)
iosNotification.AddExtra("jumpPage", am.Extra.JumpPage)
iosNotification.AddExtra("jumpUrl", am.Extra.JumpUrl)
iosNotification.AddExtra("jumpTag", am.Extra.JumpTag)
iosNotification.AddExtra("channelId", am.Extra.ChannelId)
iosNotification.AddExtra("channelGroupId", am.Extra.ChannelGroupId)
androidNotification.AddExtra("unReadCount", am.Extra.UnReadCount)
iosNotification.AddExtra("unReadCount", am.Extra.UnReadCount)
......
......@@ -372,15 +372,18 @@ type AppMessage struct {
ToUser []string `json:"toUser"`
Title string `json:"title"`
SubTitle string `json:"subTitle"`
// MsgContent string `json:"msg_content"`
// JumpEnable bool `json:"jumpEnable"`
// JumpUrl string `json:"jumpUrl"`
// JumpType string `json:"jumpType"` // enum: [ 'internal', 'external' ],
// JumpParams map[string]interface{} `json:"jumpParams"`
Extra struct {
UnReadCount int `json:"unReadCount"`
MessageId string `json:"messageId"`
JumpType string `json:"jumpType"` // enum: [ 'app','web' ],
JumpPage string `json:"jumpPage"` // enum: [ 'home', 'found', 'invite','buyCourse ','buyCard','webpage' ],
JumpUrl string `json:"jumpUrl"`
JumpTag string `json:"jumpTag"`
ChannelId string `json:"channelId"`
ChannelGroupId string `json:"channelGroupId"`
} `json:"extra"`
}
......@@ -389,10 +392,14 @@ func (am *AppMessage) ToFields() (fields logrus.Fields) {
fields["title"] = am.Title
fields["subTitle"] = am.SubTitle
// fields["msg_content"] = am.MsgContent
// fields["jumpEnable"] = am.JumpEnable
// fields["jumpUrl"] = am.JumpUrl
// fields["jumpType"] = am.JumpType
fields["jumpType"] = am.Extra.JumpType
fields["jumpPage"] = am.Extra.JumpPage
fields["jumpUrl"] = am.Extra.JumpUrl
fields["jumpTag"] = am.Extra.JumpTag
fields["channelId"] = am.Extra.ChannelId
fields["channelGroupId"] = am.Extra.ChannelGroupId
fields["unReadCount"] = am.Extra.UnReadCount
fields["messageId"] = am.Extra.MessageId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment