diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-04-04 08:20:21 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-04-04 08:20:21 -0400 |
commit | 785553384fe96027b0e9274b6ccc8623092eda70 (patch) | |
tree | 090fbe1061b61f7daa5335f1f6f9ae6ae1db4042 /webapp/components/suggestion/at_mention_provider.jsx | |
parent | d7f394a49b04e11eaf30b399cd0843963446eab9 (diff) | |
parent | ad902f601fa7570564df386bf1b03179b55242b5 (diff) | |
download | chat-785553384fe96027b0e9274b6ccc8623092eda70.tar.gz chat-785553384fe96027b0e9274b6ccc8623092eda70.tar.bz2 chat-785553384fe96027b0e9274b6ccc8623092eda70.zip |
Merge pull request #2320 from mozilla/msg-command
PLT-2231 /msg command and tests
Diffstat (limited to 'webapp/components/suggestion/at_mention_provider.jsx')
-rw-r--r-- | webapp/components/suggestion/at_mention_provider.jsx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/webapp/components/suggestion/at_mention_provider.jsx b/webapp/components/suggestion/at_mention_provider.jsx index b423528c3..90ec6e660 100644 --- a/webapp/components/suggestion/at_mention_provider.jsx +++ b/webapp/components/suggestion/at_mention_provider.jsx @@ -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)); |