about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-06-27 16:43:55 +0200
committerGitHub <noreply@github.com>2019-06-27 16:43:55 +0200
commit2f95adc06fbfae22e8f9b4df212938108f5e295c (patch)
tree13ff1b5ae743f3d147eb58dfa4a790ef1a7c049d /app/javascript/flavours/glitch/actions
parent9ef25877dfda12cf31ec586294e4d4908f5be4f0 (diff)
parent6ab7051b48dcb1d45c377a129350db1fdeaf11b8 (diff)
Merge pull request #1142 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/actions')
-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;