diff options
Diffstat (limited to 'webapp/stores/channel_store.jsx')
-rw-r--r-- | webapp/stores/channel_store.jsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx index 488e49492..ba6620750 100644 --- a/webapp/stores/channel_store.jsx +++ b/webapp/stores/channel_store.jsx @@ -398,6 +398,11 @@ class ChannelStoreClass extends EventEmitter { return; } + const member = this.getMyMember(id); + if (member && member.notify_props && member.notify_props.mark_unread === NotificationPrefs.MENTION) { + return; + } + this.unreadCounts[id].msgs++; this.get(id).total_msg_count++; } @@ -496,10 +501,10 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => { case ActionTypes.RECEIVED_POST: var id = action.post.channel_id; - var teamId = action.websocketMessageProps ? action.websocketMessageProps.team_id : ''; + var teamId = action.websocketMessageProps ? action.websocketMessageProps.team_id : null; // Current team and not current channel or the window is inactive - if (TeamStore.getCurrentId() === teamId && (ChannelStore.getCurrentId() !== id || !window.isActive)) { + if ((TeamStore.getCurrentId() === teamId || teamId === '') && (ChannelStore.getCurrentId() !== id || !window.isActive)) { ChannelStore.incrementMessages(id); ChannelStore.incrementMentionsIfNeeded(id, action.websocketMessageProps); ChannelStore.emitChange(); |