mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-11 07:14:43 +02:00
Docs (WIP), Firebase
This commit is contained in:
parent
5a9b2122c2
commit
3c3b2477af
3 changed files with 104 additions and 0 deletions
server
|
@ -81,6 +81,13 @@ func toFirebaseMessage(m *message, auther auth.Auther) (*messaging.Message, erro
|
|||
"message": m.Message,
|
||||
"encoding": m.Encoding,
|
||||
}
|
||||
if len(m.Actions) > 0 {
|
||||
actions, err := json.Marshal(m.Actions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
data["actions"] = string(actions)
|
||||
}
|
||||
if m.Attachment != nil {
|
||||
data["attachment_name"] = m.Attachment.Name
|
||||
data["attachment_type"] = m.Attachment.Type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue