Websockets: The typing event is not generating every time

We are using matter most WebSockets for implementing live messages and other updates. One of them is to check if some user is typing in the group. The typing event is showing in WebSocket messages rarely. Once in 10 times, it’s displaying correctly and most of the time, the event itself not showing.

Any idea why the behavior is inconsistent?

There is a config setting which controls how frequently those messages are sent. That’s at ServiceSettings.TimeBetweenUserTypingUpdatesMilliseconds.

If you want more frequent updates, feel free to reduce it. But note that this means more websocket messages which can cause performance degradation if your server is busy.

Thanks for the response @agnivade
Could you please share the place where we should configure the settings you mentioned?

Is it in the matter most dashboard or mattermost server or in the frontend code while creating WebSocket connection?

I am not sure what you mean by frontend code in this context. Mattermost stores its config either in a config.json file or in the database depending on how you have configured it.

I’d encourage you to read through Configuration settings — Mattermost documentation

and specifically: Configuration settings — Mattermost documentation

You can either change the config setting by manually editing the config.json file if you are using the config file or change it from the system console under the “Experimental Features” section in “User Typing Timeout”.