[Glitch] Add support for custom emojis in poll options
Fixes #956
Port 80f0910e21
to glitch-soc
This commit is contained in:
@ -69,9 +69,11 @@ export function normalizeStatus(status, normalOldStatus) {
|
||||
export function normalizePoll(poll) {
|
||||
const normalPoll = { ...poll };
|
||||
|
||||
const emojiMap = makeEmojiMap(normalPoll);
|
||||
|
||||
normalPoll.options = poll.options.map(option => ({
|
||||
...option,
|
||||
title_emojified: emojify(escapeTextContentForBrowser(option.title)),
|
||||
title_emojified: emojify(escapeTextContentForBrowser(option.title), emojiMap),
|
||||
}));
|
||||
|
||||
return normalPoll;
|
||||
|
Reference in New Issue
Block a user