Merge pull request #1502 from mattermost/disable-all
Disabling the all mention
Этот коммит содержится в:
@@ -407,9 +407,9 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add @all to keywords if user has them turned on
|
// Add @all to keywords if user has them turned on
|
||||||
if profile.NotifyProps["all"] == "true" {
|
// if profile.NotifyProps["all"] == "true" {
|
||||||
keywordMap["@all"] = append(keywordMap["@all"], profile.Id)
|
// keywordMap["@all"] = append(keywordMap["@all"], profile.Id)
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Add @channel to keywords if user has them turned on
|
// Add @channel to keywords if user has them turned on
|
||||||
if profile.NotifyProps["channel"] == "true" {
|
if profile.NotifyProps["channel"] == "true" {
|
||||||
|
|||||||
@@ -101,9 +101,11 @@ export default class ChannelHeader extends React.Component {
|
|||||||
let terms = '';
|
let terms = '';
|
||||||
if (user.notify_props && user.notify_props.mention_keys) {
|
if (user.notify_props && user.notify_props.mention_keys) {
|
||||||
const termKeys = UserStore.getCurrentMentionKeys();
|
const termKeys = UserStore.getCurrentMentionKeys();
|
||||||
if (user.notify_props.all === 'true' && termKeys.indexOf('@all') !== -1) {
|
|
||||||
termKeys.splice(termKeys.indexOf('@all'), 1);
|
// 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.splice(termKeys.indexOf('@channel'), 1);
|
termKeys.splice(termKeys.indexOf('@channel'), 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,12 +183,12 @@ export default class MentionList extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var all = {};
|
// var all = {};
|
||||||
all.username = 'all';
|
// all.username = 'all';
|
||||||
all.nickname = '';
|
// all.nickname = '';
|
||||||
all.secondary_text = 'Notifies everyone in the team';
|
// all.secondary_text = 'Notifies everyone in the team';
|
||||||
all.id = 'allmention';
|
// all.id = 'allmention';
|
||||||
users.push(all);
|
// users.push(all);
|
||||||
|
|
||||||
var channel = {};
|
var channel = {};
|
||||||
channel.username = 'channel';
|
channel.username = 'channel';
|
||||||
|
|||||||
@@ -512,7 +512,7 @@ export default class NotificationsTab extends React.Component {
|
|||||||
}.bind(this);
|
}.bind(this);
|
||||||
inputs.push(
|
inputs.push(
|
||||||
<div key='userNotificationAllOption'>
|
<div key='userNotificationAllOption'>
|
||||||
<div className='checkbox'>
|
<div className='checkbox hidden'>
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
type='checkbox'
|
type='checkbox'
|
||||||
@@ -590,9 +590,11 @@ export default class NotificationsTab extends React.Component {
|
|||||||
if (this.state.mentionKey) {
|
if (this.state.mentionKey) {
|
||||||
keys.push('@' + user.username);
|
keys.push('@' + user.username);
|
||||||
}
|
}
|
||||||
if (this.state.allKey) {
|
|
||||||
keys.push('@all');
|
// if (this.state.allKey) {
|
||||||
}
|
// keys.push('@all');
|
||||||
|
// }
|
||||||
|
|
||||||
if (this.state.channelKey) {
|
if (this.state.channelKey) {
|
||||||
keys.push('@channel');
|
keys.push('@channel');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ export default {
|
|||||||
TYPING: 'typing'
|
TYPING: 'typing'
|
||||||
},
|
},
|
||||||
|
|
||||||
SPECIAL_MENTIONS: ['all', 'channel'],
|
//SPECIAL_MENTIONS: ['all', 'channel'],
|
||||||
|
SPECIAL_MENTIONS: ['channel'],
|
||||||
CHARACTER_LIMIT: 4000,
|
CHARACTER_LIMIT: 4000,
|
||||||
IMAGE_TYPES: ['jpg', 'gif', 'bmp', 'png', 'jpeg'],
|
IMAGE_TYPES: ['jpg', 'gif', 'bmp', 'png', 'jpeg'],
|
||||||
AUDIO_TYPES: ['mp3', 'wav', 'wma', 'm4a', 'flac', 'aac'],
|
AUDIO_TYPES: ['mp3', 'wav', 'wma', 'm4a', 'flac', 'aac'],
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user