summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-11-05 09:42:29 -0500
committerJoramWilander <jwawilander@gmail.com>2015-11-05 09:42:29 -0500
commitd48b305661a2f40cc3e26593fefc7ce7bca6e320 (patch)
treea5731bb7486a8f06b4cfec5d5302ea1a896db0a3 /web
parentf3b0ae64ff0f277aa87b22a88d8e2c97a81f5fd4 (diff)
downloadchat-d48b305661a2f40cc3e26593fefc7ce7bca6e320.tar.gz
chat-d48b305661a2f40cc3e26593fefc7ce7bca6e320.tar.bz2
chat-d48b305661a2f40cc3e26593fefc7ce7bca6e320.zip
Add constant form 'mention'
Diffstat (limited to 'web')
-rw-r--r--web/react/components/sidebar.jsx3
-rw-r--r--web/react/utils/constants.jsx3
2 files changed, 5 insertions, 1 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 0f02003b6..8b5f7a381 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -20,6 +20,7 @@ const Utils = require('../utils/utils.jsx');
const Constants = require('../utils/constants.jsx');
const Preferences = Constants.Preferences;
const TutorialSteps = Constants.TutorialSteps;
+const NotificationPrefs = Constants.NotificationPrefs;
const Tooltip = ReactBootstrap.Tooltip;
const OverlayTrigger = ReactBootstrap.OverlayTrigger;
@@ -76,7 +77,7 @@ export default class Sidebar extends React.Component {
if (ch.type === 'D') {
chMentionCount = chUnreadCount;
chUnreadCount = 0;
- } else if (chMember.notify_props && chMember.notify_props.mark_unread === 'mention') {
+ } else if (chMember.notify_props && chMember.notify_props.mark_unread === NotificationPrefs.MENTION) {
chUnreadCount = 0;
}
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 7d885681a..58ee8e2d2 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -384,5 +384,8 @@ module.exports = {
BOTTOM: 1,
POST: 2,
SIDEBAR_OPEN: 3
+ },
+ NotificationPrefs: {
+ MENTION: 'mention'
}
};