Stream-notify-room method is not working

Am using websocket to communicate with the Rocket chat server. Am trying to implement the typing event indicator on the UI. For that, am calling “stream-notify-room” method. But it is not working.

  • I have initiated a ‘stream-notify-room’ subscription, when a room is created
    this.$socket.send({ msg: 'sub', id: '42', name: 'stream-notify-room', params: [ this.room + '/typing', false ] })

  • Subscription functionality is working fine. I tested and confirmed by connecting the Rocket chat server.

  • From the UI, On message typing, I have triggered
    this.$socket.send({ msg: 'method', method: 'stream-notify-room', id: '42', params: [ this.room + '/typing', this.$attrs.user.username, true ] })

  • From the UI, On message clear/typing stop, I have triggered
    this.$socket.send({ msg: 'method', method: 'stream-notify-room', id: '42', params: [ this.room + '/typing', this.$attrs.user.username, false ] })

  • On these two above event the socket message shows as
    { "msg": "result", "id": "stream-notify-room-cKe3k3Mkhk7d8i9y2" }

There is no socket message reaching on the other user(on same room) side. Am expecting some message should be reach on the other user socket and display the typing event.

Please let me know what is wrong in my steps.

Hi,

Can you go back a bit and describe what you are trying to achieve? What are you using to communicate?

A bit more background might help.

Hi John,

Thanks for your reply.

I am integrating the rocket chat to our application using the realtime APIs.

Here am trying to notify the users(in the same room) when an user typing the message.

For this purpose, I have triggered, following method on message typing(on text box)

this.$socket.send({ msg: ‘method’, method: ‘stream-notify-room’, id: ‘42’, params: [ this.room + ‘/typing’, this.$attrs.user.username, true ] })

Hi @john.crisp

I hope you got the idea about what am facing. Can you please help me to resolve this.

Thanks