Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Fix unreads appearing after some system messages posted (#5491)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilander authored and coreyhulen committed Feb 22, 2017
1 parent 9e42d5f commit 51937a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions stores/channel_store.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ var Utils;
import {ActionTypes, Constants} from 'utils/constants.jsx';
import {isSystemMessage} from 'utils/post_utils.jsx';
const NotificationPrefs = Constants.NotificationPrefs;
const PostTypes = Constants.PostTypes;

const CHANGE_EVENT = 'change';
const STATS_EVENT = 'stats';
Expand Down Expand Up @@ -507,7 +506,7 @@ ChannelStore.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) {
if (Constants.IGNORE_POST_TYPES.indexOf(action.post.type) !== -1) {
return;
}

Expand Down
2 changes: 2 additions & 0 deletions utils/constants.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ export const PostTypes = {
LEAVE_CHANNEL: 'system_leave_channel',
ADD_TO_CHANNEL: 'system_add_to_channel',
REMOVE_FROM_CHANNEL: 'system_remove_from_channel',
ADD_REMOVE: 'system_add_remove',
HEADER_CHANGE: 'system_header_change',
DISPLAYNAME_CHANGE: 'system_displayname_change',
PURPOSE_CHANGE: 'system_purpose_change',
Expand All @@ -250,6 +251,7 @@ export const Constants = {
UserSearchOptions,
TutorialSteps,
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({
SERVER_ACTION: null,
Expand Down

0 comments on commit 51937a3

Please sign in to comment.