change icon from object to string
This commit is contained in:
parent
04f2535e92
commit
99886d7f66
8 changed files with 23 additions and 77 deletions
|
@ -151,6 +151,7 @@ func toFirebaseMessage(m *message, auther auth.Auther) (*messaging.Message, erro
|
|||
"title": m.Title,
|
||||
"message": m.Message,
|
||||
"encoding": m.Encoding,
|
||||
"icon": m.Icon,
|
||||
}
|
||||
if len(m.Actions) > 0 {
|
||||
actions, err := json.Marshal(m.Actions)
|
||||
|
@ -166,11 +167,6 @@ func toFirebaseMessage(m *message, auther auth.Auther) (*messaging.Message, erro
|
|||
data["attachment_expires"] = fmt.Sprintf("%d", m.Attachment.Expires)
|
||||
data["attachment_url"] = m.Attachment.URL
|
||||
}
|
||||
if m.Icon != nil {
|
||||
data["icon_url"] = m.Icon.URL
|
||||
data["icon_type"] = m.Icon.Type
|
||||
data["icon_size"] = fmt.Sprintf("%d", m.Icon.Size)
|
||||
}
|
||||
apnsConfig = createAPNSAlertConfig(m, data)
|
||||
} else {
|
||||
// If anonymous read for a topic is not allowed, we cannot send the message along
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue