作者 yangfu

推送服务 ext扩展字段增加 键值 transData:透传数据

... ... @@ -13,7 +13,7 @@ type PushInfoRequest struct {
Title string `json:"title" valid:"Required"`
Content string `json:"content" valid:"Required"`
Ext map[string]interface{} `json:"ext"`
Ext map[string]interface{} `json:"ext"` //key->transData:透传数据
}
type PushInfoResponse struct {
}
... ...
... ... @@ -44,10 +44,14 @@ func Notification(header *protocol.RequestHeader, request *protocol.PushInfoRequ
push.Title(request.Title),
push.Content(request.Content),
push.TransmissionContent(utils.JsonAssertString(request.Ext)),
//push.TransmissionContent(utils.JsonAssertString(request.Ext)),
}
)
if v, ok := request.Ext["transData"]; ok {
options = append(options, push.TransmissionContent(utils.JsonAssertString(v)))
}
fc(request.ClientId)
fc(request.DeviceToken)
switch len(clientIds) {
... ...