mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fix teams being incorrectly marked unread across tabs (#7062)
This commit is contained in:
@@ -10,6 +10,7 @@ import Constants from 'utils/constants.jsx';
|
||||
const NotificationPrefs = Constants.NotificationPrefs;
|
||||
|
||||
import {getSiteURL} from 'utils/url.jsx';
|
||||
import {isSystemMessage, isFromWebhook} from 'utils/post_utils.jsx';
|
||||
const ActionTypes = Constants.ActionTypes;
|
||||
|
||||
const CHANGE_EVENT = 'change';
|
||||
@@ -449,6 +450,10 @@ TeamStore.dispatchToken = AppDispatcher.register((payload) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.post.user_id === UserStore.getCurrentId() && !isSystemMessage(action.post) && !isFromWebhook(action.post)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var id = action.websocketMessageProps ? action.websocketMessageProps.team_id : null;
|
||||
if (id && TeamStore.getCurrentId() !== id) {
|
||||
TeamStore.incrementMessages(id, action.post.channel_id);
|
||||
|
||||
Reference in New Issue
Block a user