Fix unreads appearing after some system messages posted (#5491)

Этот коммит содержится в:
Joram Wilander
2017-02-22 09:16:17 -05:00
коммит произвёл Corey Hulen
родитель 69cac604e0
Коммит d1f1109e59
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@@ -11,7 +11,6 @@ var Utils;
import {ActionTypes, Constants} from 'utils/constants.jsx'; import {ActionTypes, Constants} from 'utils/constants.jsx';
import {isSystemMessage} from 'utils/post_utils.jsx'; import {isSystemMessage} from 'utils/post_utils.jsx';
const NotificationPrefs = Constants.NotificationPrefs; const NotificationPrefs = Constants.NotificationPrefs;
const PostTypes = Constants.PostTypes;
const CHANGE_EVENT = 'change'; const CHANGE_EVENT = 'change';
const STATS_EVENT = 'stats'; const STATS_EVENT = 'stats';
@@ -507,7 +506,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
break; break;
case ActionTypes.RECEIVED_POST: case ActionTypes.RECEIVED_POST:
if (action.post.type === PostTypes.JOIN_LEAVE || action.post.type === PostTypes.JOIN_CHANNEL || action.post.type === PostTypes.LEAVE_CHANNEL) { if (Constants.IGNORE_POST_TYPES.indexOf(action.post.type) !== -1) {
return; return;
} }

Просмотреть файл

@@ -234,6 +234,7 @@ export const PostTypes = {
LEAVE_CHANNEL: 'system_leave_channel', LEAVE_CHANNEL: 'system_leave_channel',
ADD_TO_CHANNEL: 'system_add_to_channel', ADD_TO_CHANNEL: 'system_add_to_channel',
REMOVE_FROM_CHANNEL: 'system_remove_from_channel', REMOVE_FROM_CHANNEL: 'system_remove_from_channel',
ADD_REMOVE: 'system_add_remove',
HEADER_CHANGE: 'system_header_change', HEADER_CHANGE: 'system_header_change',
DISPLAYNAME_CHANGE: 'system_displayname_change', DISPLAYNAME_CHANGE: 'system_displayname_change',
PURPOSE_CHANGE: 'system_purpose_change', PURPOSE_CHANGE: 'system_purpose_change',
@@ -250,6 +251,7 @@ export const Constants = {
UserSearchOptions, UserSearchOptions,
TutorialSteps, TutorialSteps,
PostTypes, PostTypes,
IGNORE_POST_TYPES: [PostTypes.JOIN_LEAVE, PostTypes.JOIN_CHANNEL, PostTypes.LEAVE_CHANNEL, PostTypes.REMOVE_FROM_CHANNEL, PostTypes.ADD_TO_CHANNEL, PostTypes.ADD_REMOVE],
PayloadSources: keyMirror({ PayloadSources: keyMirror({
SERVER_ACTION: null, SERVER_ACTION: null,