change icon from object to string
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user