diff options
author | Corey Hulen <corey@hulen.com> | 2015-12-04 11:30:50 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-12-04 11:30:50 -0800 |
commit | 1bee1e06e4d0110db274c076860fa97f76471ddb (patch) | |
tree | 8f971b54319ae90246ad13905851df545bbb7b89 /web/react/utils | |
parent | 1d67f26664f8cf98f52433ef8b081b6fb485eadb (diff) | |
parent | 14d1ec5191867174837e15f616ad3fc1dc8e0dae (diff) | |
download | chat-1bee1e06e4d0110db274c076860fa97f76471ddb.tar.gz chat-1bee1e06e4d0110db274c076860fa97f76471ddb.tar.bz2 chat-1bee1e06e4d0110db274c076860fa97f76471ddb.zip |
Merge pull request #1613 from florianorben/PLT-1326
PLT-1326: Enable channel posts of type join or leave not trigger unread notifications
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/constants.jsx | 4 | ||||
-rw-r--r-- | web/react/utils/utils.jsx | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index b641e966b..2d0edd596 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -119,7 +119,9 @@ export default { POST_LOADING: 'loading', POST_FAILED: 'failed', POST_DELETED: 'deleted', - POST_TYPE_JOIN_LEAVE: 'join_leave', + POST_TYPE_JOIN_LEAVE: 'system_join_leave', + SYSTEM_MESSAGE_PREFIX: 'system_', + SYSTEM_MESSAGE_PROFILE_IMAGE: '/static/images/logo_compact.png', RESERVED_TEAM_NAMES: [ 'www', 'web', diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index ac0640f6e..afe27ef96 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -1247,3 +1247,7 @@ export function getPostTerm(post) { export function isFeatureEnabled(feature) { return PreferenceStore.getPreference(Constants.Preferences.CATEGORY_ADVANCED_SETTINGS, Constants.FeatureTogglePrefix + feature.label, {value: 'false'}).value === 'true'; } + +export function isSystemMessage(post) { + return post.type && (post.type.lastIndexOf(Constants.SYSTEM_MESSAGE_PREFIX) === 0); +}
\ No newline at end of file |