mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	popovers.js: Use people.get_mention_syntax.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							11e4011d5f
						
					
				
				
					commit
					f857111920
				
			@@ -672,7 +672,8 @@ exports.register_click_handlers = function () {
 | 
			
		||||
        }
 | 
			
		||||
        var user_id = $(e.target).parents('ul').attr('data-user-id');
 | 
			
		||||
        var name = people.get_person_from_user_id(user_id).full_name;
 | 
			
		||||
        compose_ui.insert_syntax_and_focus('@**' + name + '**');
 | 
			
		||||
        var mention = people.get_mention_syntax(name, user_id);
 | 
			
		||||
        compose_ui.insert_syntax_and_focus(mention);
 | 
			
		||||
        popovers.hide_user_sidebar_popover();
 | 
			
		||||
        popovers.hide_userlist_sidebar();
 | 
			
		||||
        e.stopPropagation();
 | 
			
		||||
@@ -685,7 +686,8 @@ exports.register_click_handlers = function () {
 | 
			
		||||
        }
 | 
			
		||||
        var user_id = $(e.target).parents('ul').attr('data-user-id');
 | 
			
		||||
        var name = people.get_person_from_user_id(user_id).full_name;
 | 
			
		||||
        compose_ui.insert_syntax_and_focus('@**' + name + '**');
 | 
			
		||||
        var mention = people.get_mention_syntax(name, user_id);
 | 
			
		||||
        compose_ui.insert_syntax_and_focus(mention);
 | 
			
		||||
        popovers.hide_message_info_popover();
 | 
			
		||||
        e.stopPropagation();
 | 
			
		||||
        e.preventDefault();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user