about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions/importer
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-06-27 21:10:01 -0700
committerReverite <github@reverite.sh>2019-06-27 21:10:01 -0700
commit9861df046853b71370cede86afbba1a371714756 (patch)
tree38416f38dfc2a2349b7a5df20646bb7d0f51361f /app/javascript/flavours/glitch/actions/importer
parent2d396aa3a0bf2674194b9f4c0e0a1052b8d23a06 (diff)
parentca17bae904783dfb1f4899a533d28a79da0c6fe9 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/actions/importer')
-rw-r--r--app/javascript/flavours/glitch/actions/importer/normalizer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js
index a8c3fe16a..c19ca8265 100644
--- a/app/javascript/flavours/glitch/actions/importer/normalizer.js
+++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js
@@ -55,7 +55,7 @@ export function normalizeStatus(status, normalOldStatus) {
     normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml');
   } else {
     const spoilerText   = normalStatus.spoiler_text || '';
-    const searchContent = [spoilerText, status.content].join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n');
+    const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n');
     const emojiMap      = makeEmojiMap(normalStatus);
 
     normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;