diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-02-13 15:19:41 -0500 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-02-13 15:19:41 -0500 |
commit | 06f89cea302bc2d634044cbab6c8a5c5b369ff02 (patch) | |
tree | 0ac873005c5c67496b5e0c476d52108888f4cef0 /webapp/stores/team_store.jsx | |
parent | 892f8f4651234631a4f83648334cf14f6da323b2 (diff) | |
download | chat-06f89cea302bc2d634044cbab6c8a5c5b369ff02.tar.gz chat-06f89cea302bc2d634044cbab6c8a5c5b369ff02.tar.bz2 chat-06f89cea302bc2d634044cbab6c8a5c5b369ff02.zip |
Final fixes for moving unread handling to client (#5392)
Diffstat (limited to 'webapp/stores/team_store.jsx')
-rw-r--r-- | webapp/stores/team_store.jsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/stores/team_store.jsx b/webapp/stores/team_store.jsx index af17f7b6f..b0133e44c 100644 --- a/webapp/stores/team_store.jsx +++ b/webapp/stores/team_store.jsx @@ -8,6 +8,8 @@ import ChannelStore from 'stores/channel_store.jsx'; import Constants from 'utils/constants.jsx'; const NotificationPrefs = Constants.NotificationPrefs; +const PostTypes = Constants.PostTypes; + import {getSiteURL} from 'utils/url.jsx'; const ActionTypes = Constants.ActionTypes; @@ -395,6 +397,10 @@ TeamStore.dispatchToken = AppDispatcher.register((payload) => { } break; case ActionTypes.RECEIVED_POST: + if (action.post.type === PostTypes.JOIN_LEAVE || action.post.type === PostTypes.JOIN_CHANNEL || action.post.type === PostTypes.LEAVE_CHANNEL) { + return; + } + var id = action.websocketMessageProps ? action.websocketMessageProps.team_id : ''; if (TeamStore.getCurrentId() !== id && id.length > 0) { TeamStore.incrementMessages(id, action.post.channel_id); |