mirror of
https://github.com/mattermost/mattermost.git
synced 2026-10-30 22:55:29 +08:00
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)
This commit is contained in:
committed by
Joram Wilander
parent
e8de443e17
commit
b2a0fb066b
@@ -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(' ');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user