summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorDavid Lu <david.lu@hotmail.com>2016-07-06 08:16:26 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-07-06 08:16:26 -0400
commitb8fcf02bf5d625184045ae597cd35273fccb07e6 (patch)
tree04fc2bace35e03b90e97bf68362efa559534eab8 /webapp
parent5f04dc4f45b9657d46380499f92ae6e5c1bf5506 (diff)
downloadchat-b8fcf02bf5d625184045ae597cd35273fccb07e6.tar.gz
chat-b8fcf02bf5d625184045ae597cd35273fccb07e6.tar.bz2
chat-b8fcf02bf5d625184045ae597cd35273fccb07e6.zip
removed @channel (#3497)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/channel_header.jsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx
index 365e8ed21..3449a0fd6 100644
--- a/webapp/components/channel_header.jsx
+++ b/webapp/components/channel_header.jsx
@@ -128,10 +128,14 @@ export default class ChannelHeader extends React.Component {
if (user.notify_props && user.notify_props.mention_keys) {
const termKeys = UserStore.getMentionKeys(user.id);
- if (user.notify_props.channel === 'true' && termKeys.indexOf('@channel') !== -1 && termKeys.indexOf('@all') !== -1) {
- termKeys.splice(termKeys.indexOf('@channel'), 1);
- termKeys.splice(termKeys.indexOf('@all'), 1);
+ if (termKeys.indexOf('@channel') !== -1) {
+ termKeys[termKeys.indexOf('@channel')] = '';
}
+
+ if (termKeys.indexOf('@all') !== -1) {
+ termKeys[termKeys.indexOf('@all')] = '';
+ }
+
terms = termKeys.join(' ');
}