Fix reaction_deck api structure
This commit is contained in:
parent
3f9a75c72f
commit
f382b16fde
3 changed files with 55 additions and 7 deletions
|
@ -45,7 +45,7 @@ const getFrequentlyUsedEmojis = createSelector([
|
|||
const { emojiCounters, reactionDeck } = data;
|
||||
let deckEmojis = reactionDeck
|
||||
.toArray()
|
||||
.map((e) => e.get('emoji'))
|
||||
.map((e) => e.getIn(['emoji', 'shortcode']))
|
||||
.filter((e) => e)
|
||||
.map((e) => shortCodes[e] || e);
|
||||
deckEmojis = [...new Set(deckEmojis)];
|
||||
|
@ -70,6 +70,8 @@ const getFrequentlyUsedEmojis = createSelector([
|
|||
|
||||
emojis = deckEmojis.slice(0, DECK_SIZE).concat(emojis);
|
||||
|
||||
if (emojis.length <= 0) emojis = ['+1'];
|
||||
|
||||
return emojis;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue