emoji: Add code comment complaining about "zulip" emoji special case.

This commit is contained in:
YashRE42 2021-11-19 18:19:00 +05:30 committed by Tim Abbott
parent 3455fc137a
commit 1f8b7b7d8d
1 changed files with 10 additions and 1 deletions

View File

@ -10,6 +10,7 @@ export const emojis_by_name = new Map();
export const all_realm_emojis = new Map();
export const active_realm_emojis = new Map();
export const deactivated_emoji_name_to_code = new Map();
const default_emoji_aliases = new Map();
@ -169,8 +170,16 @@ export function update_emojis(realm_emojis) {
});
}
}
// Add the Zulip emoji to the realm emojis list
// Add the special Zulip emoji as though it were a realm emoji.
// The Zulip emoji is the only emoji that uses a string ("zulip")
// as its ID. All other emoji use numeric IDs. This special case
// is confusing; ideally we'd convert the Zulip emoji to be
// implemented using the RealmEmoji infrastructure.
all_realm_emojis.set("zulip", zulip_emoji);
// here "zulip" is an emoji name, which is fine.
active_realm_emojis.set("zulip", zulip_emoji);
build_emoji_data(active_realm_emojis);