summaryrefslogtreecommitdiffstats
path: root/webapp/components/sidebar_right_menu.jsx
diff options
context:
space:
mode:
authorshieldsjared <shieldsjared@gmail.com>2016-08-22 13:11:37 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-08-22 13:11:37 -0400
commitb2a0fb066bb7ebcececd4a77d2af084a0700aa48 (patch)
tree35ca0bea45ccdc0c3d0e3fb9506fd532618608d2 /webapp/components/sidebar_right_menu.jsx
parente8de443e17a2e8b6fd515aa1e3288c6bd491172e (diff)
downloadchat-b2a0fb066bb7ebcececd4a77d2af084a0700aa48.tar.gz
chat-b2a0fb066bb7ebcececd4a77d2af084a0700aa48.tar.bz2
chat-b2a0fb066bb7ebcececd4a77d2af084a0700aa48.zip
PLT-3941 Updated the RHS menu logic for recent mentions to match the channel header, such that (at)all and (at)channel is removed from the search if the user has this included in their notification settings (#3842)
Diffstat (limited to 'webapp/components/sidebar_right_menu.jsx')
-rw-r--r--webapp/components/sidebar_right_menu.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/webapp/components/sidebar_right_menu.jsx b/webapp/components/sidebar_right_menu.jsx
index 09a9be51b..1cab0748f 100644
--- a/webapp/components/sidebar_right_menu.jsx
+++ b/webapp/components/sidebar_right_menu.jsx
@@ -90,13 +90,14 @@ export default class SidebarRightMenu 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 (termKeys.indexOf('@channel') !== -1) {
+ termKeys[termKeys.indexOf('@channel')] = '';
}
- if (user.notify_props.channel === 'true' && termKeys.indexOf('@channel') !== -1) {
- termKeys.splice(termKeys.indexOf('@channel'), 1);
+ if (termKeys.indexOf('@all') !== -1) {
+ termKeys[termKeys.indexOf('@all')] = '';
}
+
terms = termKeys.join(' ');
}