Using web socket with Messages Component

I’ve been searching on how can I create a real time notification when a new message comes in for Messages Component.

I understand I can use Websocket or FCM but haven’t seen code examples on how to utilize websocket or FCM in messages component.

This project is for Web only and no plan on adding IOS or Android devices.

Use https://socket.io/

There is new code examples about it because it is not different from implementing it on usual website. Just call messages api to add new messages when you receive them via socket

@shastox - I did come across socket.io and server sent events. I was able to try doing a chat app example and was able to worked it out. Then your next problem will be authentication.

@nolimits4web - Please point me to the resources of the new code example. I did come across with lots of different code examples researching and I’m not finding what I need that’s why I have asked for help to the community. I did browsed the long list of questions here trying to get some examples. Great work and commitment you have here!

1 Like

Hello,
i’ve found this gist,
may it could help
Regards
Amaury