From 1b82d98cdbb4e02d7de36c842efd858daaa69406 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Fri, 28 Apr 2017 10:10:58 -0400
Subject: Add config setting to disable statuses (#6254)

---
 webapp/actions/websocket_actions.jsx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'webapp/actions/websocket_actions.jsx')

diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index 9ed17c21d..57f78f95f 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -229,9 +229,7 @@ function handleNewPostEvent(msg) {
     posts[post.id] = post;
     loadProfilesForPosts(posts);
 
-    if (UserStore.getStatus(post.user_id) !== UserStatuses.ONLINE) {
-        StatusActions.loadStatusesByIds([post.user_id]);
-    }
+    UserStore.setStatus(post.user_id, UserStatuses.ONLINE);
 }
 
 function handlePostEditEvent(msg) {
@@ -375,9 +373,7 @@ function handlePreferencesDeletedEvent(msg) {
 function handleUserTypingEvent(msg) {
     GlobalActions.emitRemoteUserTypingEvent(msg.broadcast.channel_id, msg.data.user_id, msg.data.parent_id);
 
-    if (UserStore.getStatus(msg.data.user_id) !== UserStatuses.ONLINE) {
-        StatusActions.loadStatusesByIds([msg.data.user_id]);
-    }
+    UserStore.setStatus(msg.data.user_id, UserStatuses.ONLINE);
 }
 
 function handleStatusChangedEvent(msg) {
-- 
cgit v1.2.3-1-g7c22

