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.

emoji: Fix checks for whether custom emoji may override default.

N-Shar-mac519c31bdad8
diff --git a/static/js/settings_emoji.js b/static/js/settings_emoji.js
index 9c357cd703c..57d5665fe4e 100644
--- a/static/js/settings_emoji.js
+++ b/static/js/settings_emoji.js
@@ -70,7 +70,9 @@ function sort_author_full_name(a, b) {
}
function is_default_emoji(emoji_name) {
- return emoji_codes.names.includes(emoji_name);
+ // Spaces are replaced with `_` to match how the emoji name will
+ // actually be stored in the backend.
+ return emoji_codes.names.includes(emoji_name.replace(/ /g, "_"));
}
function is_custom_emoji(emoji_name) {