-
Notifications
You must be signed in to change notification settings - Fork 2
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
Incomplete message data when sending notification from OneSignal #6
Comments
Hi @joshua-redmond , first of all thank you for trying out my library!
You can get the firebase admin config from this page: I'll post an update once I try onesignal + aracna/fcm, lmk if you manage to get the send message working in the example :D |
@alchemicas That means it's only a problem when sending notifications using OneSignal. |
Thank you @joshua-redmond , will test it against OneSignal this week! |
Hello @joshua-redmond , I gave it a try today, but I honestly have no idea how to make it work, no matter what I put inside the notification I create on OneSignal, the raw_data that the FCM client receives is always the same bytes. I tried to investigate and look at OneSignal's SDKs code, but I couldn't make much sense of it in the time I was looking. So by using OneSignal you're basically to square one since they do not have a Node.js client for receiving notification, but just for creating them. If you can find an answer or a hint I'd be eager to help and make this work somehow, but if we have to call OneSignal APIs then it's going to be out of scope for this library. I won't investigate any further, but you or anyone else who's interested in this is welcome to help! |
Hi, good to hear from you again. That's... unfortunate 😞 I can't think of a way around it either. Thanks for your time investigating this issue 👍 |
Hi!
How do I get the message's heading and body once it's received?
I'm sending messages using OneSignal (read more about my setup here).
This is what I get from
FcmClient
'smessage
event:This is what I get from the
message-data
event:How do I get the message's heading and body from this result?
Here's my code, based on the node example kindly provided in the repo:
I also tried using the node example in it's entirety, though ran into this error when running
npm run send-message
:The
npm start
gave me a token as expected, so who knows what went wrong.BTW, thanks for all your hard work creating this package! I really tried to wrap my head around FCM's new HTTP v1 API but gave up haha, I'm glad you understand it 😆
The text was updated successfully, but these errors were encountered: