mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
hotkey: Fix upvote first emoji shortcut for custom emoji.
Fixes a bug introduced in #96eb49d, which broke the hotkey for custom emoji.
This commit is contained in:
parent
4029d80c01
commit
45c9747d4b
@ -1229,7 +1229,9 @@ export function process_hotkey(e, hotkey) {
|
||||
}
|
||||
|
||||
const canonical_name = emoji.get_emoji_name(first_reaction.emoji_code);
|
||||
reactions.toggle_emoji_reaction(msg, canonical_name);
|
||||
// `canonical_name` will be `undefined` for custom emoji, so we can default
|
||||
// to the `emoji_name`.
|
||||
reactions.toggle_emoji_reaction(msg, canonical_name ?? first_reaction.emoji_name);
|
||||
return true;
|
||||
}
|
||||
case "toggle_topic_visibility_policy":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user