about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorBen Lubar <ben.lubar@gmail.com>2020-06-08 17:11:42 -0500
committerThibaut Girka <thib@sitedethib.com>2020-06-09 11:02:24 +0200
commit4657c1a1cad743d3d4b7d2540d598d92db4eaba7 (patch)
treecdc06b0a50c24d10ecc8d666bc99ef7a63c19134 /app/javascript
parent776aff96561fc70a7c37023b444e364781dd2a3e (diff)
[Glitch] FIX: filters ignore media descriptions
Port c66403b2579587d8c1448be3ad30dc388d5f29c3 to glitch-soc

Co-authored-by: Thibaut Girka <thib@sitedethib.com>
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript')
-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 52ad17779..05955963c 100644
--- a/app/javascript/flavours/glitch/actions/importer/normalizer.js
+++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js
@@ -12,7 +12,7 @@ const makeEmojiMap = record => record.emojis.reduce((obj, emoji) => {
 
 export function searchTextFromRawStatus (status) {
   const spoilerText   = status.spoiler_text || '';
-  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 searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).concat(status.media_attachments.map(att => att.description)).join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n');
   return domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;
 }