1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-24 07:47:35 +02:00

change icon from object to string

This commit is contained in:
Hunter Kehoe 2022-07-17 15:40:24 -06:00
parent 04f2535e92
commit 99886d7f66
8 changed files with 23 additions and 77 deletions

View file

@ -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