diff --git a/components/suggestion/at_mention_provider.jsx b/components/suggestion/at_mention_provider.jsx
index b33662420d59..b9127e8d3519 100644
--- a/components/suggestion/at_mention_provider.jsx
+++ b/components/suggestion/at_mention_provider.jsx
@@ -43,6 +43,15 @@ class AtMentionSuggestion extends Suggestion {
/>
);
icon = ;
+ } else if (user.username === 'here') {
+ username = 'here';
+ description = (
+
+ );
+ icon = ;
} else {
username = user.username;
@@ -126,6 +135,9 @@ export default class AtMentionProvider {
if ('all'.startsWith(prefix)) {
filtered.push({username: 'all'});
}
+ if ('here'.startsWith(prefix)) {
+ filtered.push({username: 'here'});
+ }
}
filtered.sort((a, b) => {
diff --git a/i18n/en.json b/i18n/en.json
index aee9068185dd..ab7406d45824 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1410,6 +1410,7 @@
"sso_signup.team_error": "Please enter a team name",
"suggestion.mention.all": "Notifies everyone in the channel, use in {townsquare} to notify the whole team",
"suggestion.mention.channel": "Notifies everyone in the channel",
+ "suggestion.mention.here": "Notifies everyone in the channel and online",
"suggestion.search.private": "Private Groups",
"suggestion.search.public": "Public Channels",
"team_export_tab.download": "download",
diff --git a/utils/constants.jsx b/utils/constants.jsx
index f0b3f30c9156..207ec5811d60 100644
--- a/utils/constants.jsx
+++ b/utils/constants.jsx
@@ -217,7 +217,7 @@ export const Constants = {
ONLINE: 'online'
},
- SPECIAL_MENTIONS: ['all', 'channel'],
+ SPECIAL_MENTIONS: ['all', 'channel', 'here'],
CHARACTER_LIMIT: 4000,
IMAGE_TYPES: ['jpg', 'gif', 'bmp', 'png', 'jpeg'],
AUDIO_TYPES: ['mp3', 'wav', 'wma', 'm4a', 'flac', 'aac', 'ogg'],
diff --git a/utils/text_formatting.jsx b/utils/text_formatting.jsx
index 5ada7727f3a3..b304fa75a823 100644
--- a/utils/text_formatting.jsx
+++ b/utils/text_formatting.jsx
@@ -207,6 +207,7 @@ function highlightCurrentMentions(text, tokens) {
let output = text;
const mentionKeys = UserStore.getCurrentMentionKeys();
+ mentionKeys.push('@here');
// look for any existing tokens which are self mentions and should be highlighted
var newTokens = new Map();