matrix-org / sygnal

Sygnal: reference Push Gateway for Matrix
Apache License 2.0
153 stars 139 forks source link

Sygnal only sending data-only FCM messages #366

Open msl2000 opened 3 months ago

msl2000 commented 3 months ago

Hi all,

I am trying to receive notifications to a react native app using FCM as the provider for both iOS and android.

I noticed that Sygnal seem to only be sending data-only messages and does not include the notification payload.

Am I missing something or this actually built this way? How would we send the notification payload. Any help would be appreciated..

MichalNemec commented 3 months ago

when you get data notification, you can create notification from that data, its actually a good thing from my pov.

msl2000 commented 3 months ago

when you get data notification, you can create notification from that data, its actually a good thing from my pov.

Only problem is that I occasionally lose data only notification when the app is starting up in the background. very prevalent in iOS even though I create a headless app.

devonh commented 2 weeks ago

There is a way to specify a notification field for all FCM notifications. To do so you would add an entry in the config for a gcm pusher like this:

fcm_options:
    notification:
        body: "test body"

However, this would apply the same to every notification sent to devices that fall under that pusher.

There is currently no way to specify notification field values on a per device basis.