summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-07-23 16:11:14 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-08-02 15:46:57 -0700
commit568496e3a210e7523e3c78089113585952b1260e (patch)
tree0e73b59e716c90ba3bd1a8a4ec1e744167bb2f82 /web
parent66136a557ca3fbef495de6500c09498ce7c8a285 (diff)
downloadchat-568496e3a210e7523e3c78089113585952b1260e.tar.gz
chat-568496e3a210e7523e3c78089113585952b1260e.tar.bz2
chat-568496e3a210e7523e3c78089113585952b1260e.zip
Searching for recent mentions no longer includes all or channel if those options were toggled in the users mention settings
Diffstat (limited to 'web')
-rw-r--r--web/react/components/channel_header.jsx9
1 files changed, 8 insertions, 1 deletions
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({