Add emoji alias-names support

This commit is contained in:
KMY 2023-05-22 10:44:32 +09:00
parent dd05f2b58c
commit 8638e715cb
9 changed files with 42 additions and 6 deletions

View file

@ -143,6 +143,8 @@ export const buildCustomEmojis = (customEmojis) => {
const shortcode = emoji.get('shortcode');
const url = autoPlayGif ? emoji.get('url') : emoji.get('static_url');
const name = shortcode.replace(':', '');
const aliases = emoji.get('aliases');
const keywords = aliases ? [name, ...aliases] : [name];
emojis.push({
id: name,
@ -150,7 +152,7 @@ export const buildCustomEmojis = (customEmojis) => {
short_names: [name],
text: '',
emoticons: [],
keywords: [name],
keywords,
imageUrl: url,
custom: true,
customCategory: emoji.get('category'),