diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-06-28 15:54:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-28 15:54:10 +0200 |
commit | e64e6a03dd1e0978fee48f0596dcfbc7fd29958f (patch) | |
tree | d3a3da3ebed0fc4b942993bab88240f360903686 /app/javascript/mastodon/features/emoji/emoji.js | |
parent | 072158ee973f8e09a0abd34a825d9bce038a5d68 (diff) |
Add categories for custom emojis (#11196)
Fix #7940
Diffstat (limited to 'app/javascript/mastodon/features/emoji/emoji.js')
-rw-r--r-- | app/javascript/mastodon/features/emoji/emoji.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/emoji/emoji.js b/app/javascript/mastodon/features/emoji/emoji.js index 988cea253..01b5a6664 100644 --- a/app/javascript/mastodon/features/emoji/emoji.js +++ b/app/javascript/mastodon/features/emoji/emoji.js @@ -92,8 +92,11 @@ export const buildCustomEmojis = (customEmojis) => { keywords: [name], imageUrl: url, custom: true, + customCategory: emoji.get('category'), }); }); return emojis; }; + +export const categoriesFromEmojis = customEmojis => customEmojis.reduce((set, emoji) => set.add(emoji.get('category') ? `custom-${emoji.get('category')}` : 'custom'), new Set()); |