Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to receive custom keys in FCM Notification Payload after updating to V1 #393

Open
mdhanif-simformsolutions opened this issue Sep 19, 2024 · 0 comments

Comments

@mdhanif-simformsolutions

Hey,
we are using push notification using sygnal, recently we encountered notifications were disabled as firebase has deprecated and it's recommended to use V1 api's.
So we have upgraded our Sygnal Version to the latest one v0.15.0 and there were changes regarding how we receive payload in the latest version which we found from :- https://github.com/matrix-org/sygnal/blob/main/docs/applications.md#api-v1

Now before upgrading sygnal to latest version our content used to be like this :-

....Some keys 
"sender_display_name": "Major Tom",
  "content": {
    "msgtype": "m.text",
    "body": "I'm floating in a most peculiar way.",
    "format": "org.matrix.custom.html",
    "rel_type": "m.thread",
    "m.new_content": {
    "body": "some text",
    "format": "some format",
    "rel_type": "some rel type"
    }
  },
  "room_id": "!slw48wfj34rtnrf:example.org"
...Some other keys

Now but with the new Version we don't get all the keys :-

....Some keys 
"sender_display_name": "Major Tom",
"content_msgtype": "m.text",
"content_body": "I'm floating in a most peculiar way.",
"content_format": "org.matrix.custom.html",
// Missing all other keys as well as new content 
"room_id": "!slw48wfj34rtnrf:example.org"
...Some other keys

This is how I add a pusher :-

matrixSessionFactory.getSession()?.pushersService()?.addHttpPusher(
            HttpPusher(
                pushkey = "fcmToken",
                appDisplayName = "App name",
                appId = "appId",
                profileTag = "",
                lang = "en",
                deviceDisplayName = "Display Name",
                deviceId = "Device Id",
                url = "appUrl",
                enabled = true,
                append = true,
                withEventIdOnly = false
            )
        )

Can you please share if I have missed anything or if this has been removed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant