Skip to content

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

@matrixbot

Description

@matrixbot

This issue was originally created by @mdhanif-simformsolutions at matrix-org/sygnal#393.

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions