fix for silent iOS notifications (thank you @hnt3b453)

This commit is contained in:
Roland Osborne 2023-04-19 17:10:09 -07:00
parent fc0d6a82df
commit bd6abfc218

View File

@ -11,6 +11,7 @@ import (
type Payload struct { type Payload struct {
Title string `json:"title"` Title string `json:"title"`
Body string `json:"body"` Body string `json:"body"`
Sound string `json:"sound"`
} }
type Message struct { type Message struct {
@ -58,7 +59,7 @@ func SendPushEvent(account store.Account, event string) {
rows.Scan(&pushToken, &messageTitle, &messageBody) rows.Scan(&pushToken, &messageTitle, &messageBody)
url := "https://fcm.googleapis.com/fcm/send" url := "https://fcm.googleapis.com/fcm/send"
payload := Payload{ Title: messageTitle, Body: messageBody }; payload := Payload{ Title: messageTitle, Body: messageBody, Sound: "default" };
message := Message{ Notification: payload, To: pushToken }; message := Message{ Notification: payload, To: pushToken };
body, err := json.Marshal(message) body, err := json.Marshal(message)