Merge pull request #2320 from mozilla/msg-command

PLT-2231 /msg command and tests
Этот коммит содержится в:
Joram Wilander
2016-04-04 08:20:21 -04:00
родитель d7f394a49b ad902f601f
Коммит 785553384f
5 изменённых файлов: 201 добавлений и 7 удалений

Просмотреть файл

@@ -100,13 +100,16 @@ export default class AtMentionProvider {
}
}
// add dummy users to represent the @all and @channel special mentions
if ('all'.startsWith(usernamePrefix)) {
filtered.push({username: 'all'});
}
//Don't imply that @all and @channel can be direct messaged
if (!pretext.startsWith('/msg')) {
// add dummy users to represent the @all and @channel special mentions
if ('all'.startsWith(usernamePrefix)) {
filtered.push({username: 'all'});
}
if ('channel'.startsWith(usernamePrefix)) {
filtered.push({username: 'channel'});
if ('channel'.startsWith(usernamePrefix)) {
filtered.push({username: 'channel'});
}
}
filtered = filtered.sort((a, b) => a.username.localeCompare(b.username));