From 568496e3a210e7523e3c78089113585952b1260e Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Thu, 23 Jul 2015 16:11:14 -0700 Subject: Searching for recent mentions no longer includes all or channel if those options were toggled in the users mention settings --- web/react/components/channel_header.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx index 76dbe370b..0dac593b1 100644 --- a/web/react/components/channel_header.jsx +++ b/web/react/components/channel_header.jsx @@ -125,7 +125,14 @@ module.exports = React.createClass({ var terms = ""; if (user.notify_props && user.notify_props.mention_keys) { - terms = UserStore.getCurrentMentionKeys().join(' '); + var termKeys = UserStore.getCurrentMentionKeys(); + 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) { + termKeys.splice(termKeys.indexOf("@channel"), 1); + } + terms = termKeys.join(' '); } AppDispatcher.handleServerAction({ -- cgit v1.2.3-1-g7c22