Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

hotkey: Fix upvote first emoji shortcut for custom emoji.

evykassirer45c9747d4bef
diff --git a/web/src/hotkey.js b/web/src/hotkey.js
index 1b805c8b3ec..e9fa852d29e 100644
--- a/web/src/hotkey.js
+++ b/web/src/hotkey.js
@@ -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":