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

how to send push notification data to my custom http endpoint instead of mongoosepush? #4244

Closed
alvinlal opened this issue Mar 13, 2024 · 2 comments

Comments

@alvinlal
Copy link

MongooseIM version: 6.1.1
Installed from: pkg
Erlang/OTP version: 26

I have setup mongoosepush with mongooseim for push notifications by following this tutorial and its working fine, but i need to use my custom http endpoint to send the push notification to fcm / apns instead of using mongoosepush. Can anyone provide me info on how to set this up in the configuration file ?

@gustawlippa
Copy link
Contributor

gustawlippa commented May 15, 2024

Hi @alvinlal!
If your custom endpoint has the same API as MongoosePush, you could just replace the address in the config. I doubt that's the case, so you will have to either provide the same API for Mongoose as MongoosePush, or implement requests to your custom API in Mongoose. You could use the existing https://github.com/esl/MongooseIM/blob/master/src/mod_push_service_mongoosepush.erl module as a starting point. Hope this answers your question!

@alvinlal
Copy link
Author

thanks @gustawlippa , i solved this by creating a custom push notification handler in nodejs and using http backend in mod_event_pusher

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

2 participants