mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
hotkey: Remap + key to use canonical name for thumbs up emoji.
This commit is contained in:
committed by
Tim Abbott
parent
01b0a8156d
commit
ef4337edcb
@@ -165,6 +165,11 @@ function stubbing(func_name_to_stub, test_function) {
|
||||
set_global('emoji_picker', {
|
||||
reactions_popped: return_false,
|
||||
});
|
||||
set_global('emoji_codes', {
|
||||
codepoint_to_name: {
|
||||
'1f44d': 'thumbs_up',
|
||||
},
|
||||
});
|
||||
set_global('hotspots', {
|
||||
is_open: return_false,
|
||||
});
|
||||
|
||||
@@ -671,7 +671,10 @@ exports.process_hotkey = function (e, hotkey) {
|
||||
reactions.open_reactions_popover();
|
||||
return true;
|
||||
case 'thumbs_up_emoji': // '+': reacts with thumbs up emoji on selected message
|
||||
reactions.toggle_emoji_reaction(msg.id, '+1');
|
||||
// Use canonical name.
|
||||
var thumbs_up_codepoint = '1f44d';
|
||||
var canonical_name = emoji_codes.codepoint_to_name[thumbs_up_codepoint];
|
||||
reactions.toggle_emoji_reaction(msg.id, canonical_name);
|
||||
return true;
|
||||
case 'toggle_mute':
|
||||
muting_ui.toggle_mute(msg);
|
||||
|
||||
Reference in New Issue
Block a user