From bfa04c0ab0eca5d812ad64e5f51e95ec458cf0d3 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 21 Jul 2016 10:00:09 -0400 Subject: PLT-2408 Adds here mention for online users (#3619) * Added @here mention that notifies online users * Fixed existing race condition that would sometime cause clients to miss mention count changes * Added missing localization strings * Prevent @here from mentioning the user who posted it --- webapp/components/suggestion/at_mention_provider.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'webapp/components/suggestion') diff --git a/webapp/components/suggestion/at_mention_provider.jsx b/webapp/components/suggestion/at_mention_provider.jsx index b33662420..b9127e8d3 100644 --- a/webapp/components/suggestion/at_mention_provider.jsx +++ b/webapp/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) => { -- cgit v1.2.3-1-g7c22