Fix notification sounds under iOS
Some checks failed
Build Docker and Deploy / Build Docker Container (push) Successful in 1m38s
Build Docker and Deploy / Run Unit-Tests (push) Failing after 9m23s
Build Docker and Deploy / Deploy to Server (push) Has been skipped

This commit is contained in:
2025-12-18 15:02:51 +01:00
parent 54c4f873fc
commit 24bf7cd434

View File

@@ -1,22 +1,23 @@
package push
import (
scn "blackforestbytes.com/simplecloudnotifier"
"blackforestbytes.com/simplecloudnotifier/models"
"bytes"
"context"
_ "embed"
"encoding/json"
"errors"
"fmt"
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
"github.com/gin-gonic/gin"
"github.com/rs/zerolog/log"
"io"
"net/http"
"strconv"
"strings"
"time"
scn "blackforestbytes.com/simplecloudnotifier"
"blackforestbytes.com/simplecloudnotifier/models"
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
"github.com/gin-gonic/gin"
"github.com/rs/zerolog/log"
)
// https://firebase.google.com/docs/cloud-messaging/send-message#rest
@@ -66,7 +67,13 @@ func (fb FirebaseConnector) SendNotification(ctx context.Context, user models.Us
"title": msg.Title,
"body": msg.ShortContent(),
},
"apns": gin.H{},
"apns": gin.H{
"payload": gin.H{
"aps": gin.H{
"sound": "default",
},
},
},
}
} else if client.Type == models.ClientTypeAndroid {
jsonBody = gin.H{