mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-30 19:43:47 +00:00 
			
		
		
		
	emoji: Abstract all name_to_codepoint, codepoint_to_name accesses.
Computed indexes into these raw objects should be guarded with Object.prototype.hasOwnProperty; make our accessors do this automatically and use them consistently. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							e5e1a05e74
						
					
				
				
					commit
					080abf4a1e
				
			| @@ -1,5 +1,3 @@ | ||||
| const emoji_codes = require("../generated/emoji/emoji_codes.json"); | ||||
|  | ||||
| function do_narrow_action(action) { | ||||
|     action(current_msg_list.selected_id(), {trigger: 'hotkey'}); | ||||
|     return true; | ||||
| @@ -731,7 +729,7 @@ exports.process_hotkey = function (e, hotkey) { | ||||
|     case 'thumbs_up_emoji': { // '+': reacts with thumbs up emoji on selected message | ||||
|         // Use canonical name. | ||||
|         const thumbs_up_emoji_code = '1f44d'; | ||||
|         const canonical_name = emoji_codes.codepoint_to_name[thumbs_up_emoji_code]; | ||||
|         const canonical_name = emoji.get_emoji_name(thumbs_up_emoji_code); | ||||
|         reactions.toggle_emoji_reaction(msg.id, canonical_name); | ||||
|         return true; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user