laravel-notification-channels / fcm

Firebase Cloud Messaging (FCM) notifications channel for Laravel
https://laravel-notification-channels.com/
MIT License
472 stars 121 forks source link

Need setContentAvailable for Silent Notification In IOS #154

Closed EkoSBP closed 10 months ago

EkoSBP commented 1 year ago

Hello, I am eko, i need set content-available in payload fcm api send like this

{
    "to": "<Device FCM token>",
    "notification": {
      **"content_available": true,**
    },
    "data": {
      "title": "Check this Mobile (title)",
      "body": "Rich Notification testing (body)",
     }
}

or

{
    "to": "<Device FCM token>",
     **"content_available": true,**
    "notification": {},
    "data": {
      "title": "Check this Mobile (title)",
      "body": "Rich Notification testing (body)",
     }
}

I read documentation and find information if content_avaible set to apns, notification not necessarily not send. this documentation : image

so I need setContentAvailable to implementation this. sorry, my english is bad.

dwightwatson commented 1 year ago

Happy to accept a PR with tests that adds this.