From f3825ba766625806e0776a17146ca5fff372612e Mon Sep 17 00:00:00 2001
From: David Lu <david.lu@hotmail.com>
Date: Sat, 4 Jun 2016 11:21:50 -0700
Subject: PLT-2994 Added @all (#3233)

* Added @all

* Uncomment @all server side
---
 webapp/components/suggestion/at_mention_provider.jsx | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'webapp/components/suggestion/at_mention_provider.jsx')

diff --git a/webapp/components/suggestion/at_mention_provider.jsx b/webapp/components/suggestion/at_mention_provider.jsx
index 2e297a175..aec1252ea 100644
--- a/webapp/components/suggestion/at_mention_provider.jsx
+++ b/webapp/components/suggestion/at_mention_provider.jsx
@@ -4,6 +4,7 @@
 import React from 'react';
 
 import SuggestionStore from 'stores/suggestion_store.jsx';
+import ChannelStore from 'stores/channel_store.jsx';
 import UserStore from 'stores/user_store.jsx';
 import * as Utils from 'utils/utils.jsx';
 import Client from 'utils/web_client.jsx';
@@ -25,7 +26,10 @@ class AtMentionSuggestion extends Suggestion {
             description = (
                 <FormattedMessage
                     id='suggestion.mention.all'
-                    defaultMessage='Notifies everyone in the team'
+                    defaultMessage='Notifies everyone in the channel, use in {townsquare} to notify the whole team'
+                    values={{
+                        townsquare: ChannelStore.getByName('town-square').display_name
+                    }}
                 />
             );
             icon = <i className='mention__image fa fa-users fa-2x'/>;
@@ -97,10 +101,13 @@ export default class AtMentionProvider {
             }
 
             if (!pretext.startsWith('/msg')) {
-                // add dummy users to represent the @channel special mention when not using the /msg command
+                // add dummy users to represent the @channel and @all special mentions when not using the /msg command
                 if ('channel'.startsWith(usernamePrefix)) {
                     filtered.push({username: 'channel'});
                 }
+                if ('all'.startsWith(usernamePrefix)) {
+                    filtered.push({username: 'all'});
+                }
             }
 
             filtered = filtered.sort((a, b) => a.username.localeCompare(b.username));
-- 
cgit v1.2.3-1-g7c22

