diff --git a/src/modules/instance.js b/src/modules/instance.js index 8aadce77e8..a7a91d99cf 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -116,9 +116,15 @@ const instance = { .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}) }, groupedCustomEmojis (state) { + const packsOf = emoji => { + return emoji.tags + .filter(k => k.startsWith('pack:')) + .map(k => k.slice(5)) // remove 'pack:' prefix + } + return state.customEmoji .reduce((res, emoji) => { - emoji.tags.forEach(packName => { + packsOf(emoji).forEach(packName => { const packId = `custom-${packName}` if (!res[packId]) { res[packId] = ({