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

Color part of the message #198

Closed SkayperTeam closed 2 months ago

SkayperTeam commented 2 months ago

Help me please. How can I colorize the message part of a push notification on android and ios?

I found a custom parameter for the FcmMessage constructor, but as far as I understand, the full coloring is described there (and at the same time this parameter is missing on my version of the package)

In my case I send a notification

"You must pay $100"

I need the amount to be colored red in the push itself

My version of your package: 3.2.1

laravel 10 version

dwightwatson commented 2 months ago

No longer supporting that version, I'm sorry.

See if you can replicate on version 4, happy to accept a PR that resolves any issues with colour.

SkayperTeam commented 2 months ago

@dwightwatson , okay thank you.

Tell me, if I switch to version 4, is there a solution to my question or is the functionality I need currently missing in the package?

UPD: I’m clarifying because while reading the documentation I saw only the “custom” parameter and I’m not entirely sure that it solves my problem

dwightwatson commented 2 months ago

I believe the custom option lets you pass the color setting in. I haven't used it myself so you would need to test it. This channel simply bridges between Laravel and the Firebase library so if it is supported there you should be able to use it.

SkayperTeam commented 2 months ago

thx