Add support for custom emojis in poll options (#10322)
* Backend changes for custom emoji support in poll options * Serialize poll emojis in REST API * Render custom emojis in poll options * Render custom emoji in poll options on public pages
This commit is contained in:
@ -71,9 +71,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