summaryrefslogtreecommitdiffstats
path: root/webapp/components/channel_header.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/channel_header.jsx')
-rw-r--r--webapp/components/channel_header.jsx7
1 files changed, 2 insertions, 5 deletions
diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx
index 91060f583..34ac53705 100644
--- a/webapp/components/channel_header.jsx
+++ b/webapp/components/channel_header.jsx
@@ -125,12 +125,9 @@ 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.all === 'true' && termKeys.indexOf('@all') !== -1) {
- termKeys.splice(termKeys.indexOf('@all'), 1);
- }
-
- if (user.notify_props.channel === 'true' && termKeys.indexOf('@channel') !== -1) {
+ 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);
}
terms = termKeys.join(' ');
}