Client always receives PushMessage data property as an empty object

I receive a data object when I send a push notification from Expo’s Push Notification Tool. However, when I try to send data in a push notification from the server, using the PushMessage class, I always receive data as an empty object. Has anyone else experienced this issue?

This is what my data object looks like:

PushClient().publish(
       PushMessage(to="ExponentPushToken[xxxx]",
                               body="Notification body",
                               title='Title',
                               data={
                                   "type": "reminder",
                                   "payload": {
                                          "user_Id": "1",
                                    }
                               }
                              )
                        )


This is the what I receive when I send a push notification using the Expo Push Notification Tool:

{"data": Object {
     "payload": Object {
          "user_Id": "1",
      },
     "type": "reminder",
  },
     "origin": "selected",
     "remote": true,
}


This is the what I receive when I send a push notification from my server:

Object {
    "data": Object {},
    "origin": "selected",
    "remote": true,
}

Please halp! Thanks a bunch in advance! :pray:

what tool are you using on your server for this?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.