summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
authorFlorian Orben <florian.orben@gmail.com>2015-12-04 02:07:47 +0100
committerFlorian Orben <florian.orben@gmail.com>2015-12-04 02:07:47 +0100
commit14d1ec5191867174837e15f616ad3fc1dc8e0dae (patch)
treecc74c752199a42b3e273570586eb5abd3bc41581 /web/react/utils
parentd5d66214db6c108eb94cf2e43c0c4538cdb5d7ae (diff)
downloadchat-14d1ec5191867174837e15f616ad3fc1dc8e0dae.tar.gz
chat-14d1ec5191867174837e15f616ad3fc1dc8e0dae.tar.bz2
chat-14d1ec5191867174837e15f616ad3fc1dc8e0dae.zip
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.jsx4
-rw-r--r--web/react/utils/utils.jsx4
2 files changed, 7 insertions, 1 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 8164095b9..25a494d07 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -118,7 +118,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 0a52f5b37..a1d800bca 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -1243,3 +1243,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