Realtime Api Subscriptions


#1

Hello,

Im using web socket and connect to my server, succesfully subscribe “stream-notify-user” with all available events on the documentation. But i need to get messages. There is only 2 event fired when someone type a message on some room and those are “rooms-changed” and “subscriptions-changed”. Both fired same time and working great. But “message” event does not fire and i dont know when it should.

stream-notify-room onyl have “deleteMessage” event so i did not try that. I try to subscribe “stream-room-messages” but no success, whatever i do its giving nosub message. Am i missing something? Im trying to subscribe it just like mentioned on the documentation ;

{ "msg": "sub", "id": "unique-id", "name": "stream-room-messages", "params":[ "room-id", false ] }

Thank you for help,
Best regards.


#2

It seems i was using the subscription id instead room-id. Its working and messages start flowing when i changed it. Incase someone else do the same mistake i leave it here. rid is the room id in the subscriptions list.

Thank you for help Guilherme.