diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-02-13 09:27:28 -0500 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-02-13 09:27:28 -0500 |
commit | ff741740eebceb43b1d69b13d97ae7eed2aa32d1 (patch) | |
tree | 0f795cea935a72997bf3618ceaf3b0513d5e8096 /webapp/actions/post_actions.jsx | |
parent | fac85b676eafb20b5f70db1805006d64889606ff (diff) | |
download | chat-ff741740eebceb43b1d69b13d97ae7eed2aa32d1.tar.gz chat-ff741740eebceb43b1d69b13d97ae7eed2aa32d1.tar.bz2 chat-ff741740eebceb43b1d69b13d97ae7eed2aa32d1.zip |
Increase performance when receiving messages (#5375)
Diffstat (limited to 'webapp/actions/post_actions.jsx')
-rw-r--r-- | webapp/actions/post_actions.jsx | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx index 61f193b66..633a6f66a 100644 --- a/webapp/actions/post_actions.jsx +++ b/webapp/actions/post_actions.jsx @@ -5,7 +5,6 @@ import AppDispatcher from 'dispatcher/app_dispatcher.jsx'; import ChannelStore from 'stores/channel_store.jsx'; import PostStore from 'stores/post_store.jsx'; -import TeamStore from 'stores/team_store.jsx'; import UserStore from 'stores/user_store.jsx'; import {loadStatusesForChannel} from 'actions/status_actions.jsx'; @@ -18,30 +17,11 @@ const ActionTypes = Constants.ActionTypes; const Preferences = Constants.Preferences; export function handleNewPost(post, msg) { - const teamId = TeamStore.getCurrentId(); - - if (ChannelStore.getCurrentId() === post.channel_id) { - if (window.isActive) { - AsyncClient.viewChannel(); - } else { - AsyncClient.getChannel(post.channel_id); - } - } else if (msg && (teamId === msg.data.team_id || msg.data.channel_type === Constants.DM_CHANNEL)) { - if (Client.teamId) { - AsyncClient.getChannel(post.channel_id); - } - } - let websocketMessageProps = null; if (msg) { websocketMessageProps = msg.data; } - const myTeams = TeamStore.getMyTeamMembers(); - if (msg.data.team_id !== teamId && myTeams.filter((m) => m.team_id === msg.data.team_id).length) { - AsyncClient.getMyTeamsUnread(teamId); - } - if (post.root_id && PostStore.getPost(post.channel_id, post.root_id) == null) { Client.getPost( post.channel_id, |