Fix notification sounds under iOS
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user