summaryrefslogtreecommitdiffstats
path: root/webapp/actions/global_actions.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/actions/global_actions.jsx')
-rw-r--r--webapp/actions/global_actions.jsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx
index c8da43f24..beca75509 100644
--- a/webapp/actions/global_actions.jsx
+++ b/webapp/actions/global_actions.jsx
@@ -454,7 +454,9 @@ export function viewLoggedIn() {
let lastTimeTypingSent = 0;
export function emitLocalUserTypingEvent(channelId, parentId) {
const t = Date.now();
- if ((t - lastTimeTypingSent) > Constants.UPDATE_TYPING_MS) {
+ const membersInChannel = ChannelStore.getStats(channelId).member_count;
+
+ if (((t - lastTimeTypingSent) > global.window.mm_config.TimeBetweenUserTypingUpdatesMilliseconds) && membersInChannel < global.window.mm_config.MaxNotificationsPerChannel && global.window.mm_config.EnableUserTypingMessages === 'true') {
WebSocketClient.userTyping(channelId, parentId);
lastTimeTypingSent = t;
}