mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	compose: Improved warning for wildcard mentions.
Edited the warning to clearly state that most members/most stream members will be notified on using wildcard mentions, along with the specific mention (e.g. @ALL, @everyone and @stream). Did a separate check for all wildcard mentions in util.js and stored the corresponding mention in wildcard_mention inside compose.js. Fixes: #13636
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							23a5cf41dc
						
					
				
				
					commit
					1fa46b1963
				
			@@ -209,9 +209,12 @@ exports.CachedValue.prototype = {
 | 
			
		||||
    },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.is_all_or_everyone_mentioned = function (message_content) {
 | 
			
		||||
    const all_everyone_re = /(^|\s)(@\*{2}(all|everyone|stream)\*{2})($|\s)/;
 | 
			
		||||
    return all_everyone_re.test(message_content);
 | 
			
		||||
exports.find_wildcard_mentions = function (message_content) {
 | 
			
		||||
    const mention = message_content.match(/(^|\s)(@\*{2}(all|everyone|stream)\*{2})($|\s)/);
 | 
			
		||||
    if (mention === null) {
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
    return mention[3];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.move_array_elements_to_front = function util_move_array_elements_to_front(array, selected) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user