Render unicode emoji in polls using emoji pack (#10185)

This commit is contained in:
Eugen Rochko
2019-03-06 03:57:46 +01:00
committed by GitHub
parent efd0fb8088
commit 4407f07014
3 changed files with 14 additions and 3 deletions

View File

@ -67,3 +67,14 @@ export function normalizeStatus(status, normalOldStatus) {
return normalStatus;
}
export function normalizePoll(poll) {
const normalPoll = { ...poll };
normalPoll.options = poll.options.map(option => ({
...option,
title_emojified: emojify(escapeTextContentForBrowser(option.title)),
}));
return normalPoll;
}