about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions/importer
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-20 17:29:12 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-20 17:34:32 +0100
commit8b5b686f087f99d1a2b54e0760add8180d77fa7e (patch)
tree4bec904a28c70b916d18055f8291f17c2e58e07b /app/javascript/flavours/glitch/actions/importer
parentcbf1d711ba2fab4921bfcf57e7df0b952503f568 (diff)
[Glitch] Add support for custom emojis in poll options
Fixes #956

Port 80f0910e2141b24082b9143266a9a6cf1ef6a516 to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/actions/importer')
-rw-r--r--app/javascript/flavours/glitch/actions/importer/normalizer.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js
index ccd84364e..a8c3fe16a 100644
--- a/app/javascript/flavours/glitch/actions/importer/normalizer.js
+++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js
@@ -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;