about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-12-28 23:25:50 +0100
committerGitHub <noreply@github.com>2021-12-28 23:25:50 +0100
commit37e80994f81bdb07e31f1a55cd37c967822a1a2a (patch)
tree7c3eac52344e0a00e99862958a543d743017645b /app
parentfe71548844715d796b9a6d2dd5234f70cf080f13 (diff)
Fix media descriptions not being used for client-side filtering (#17206)
Fix oversight in #13837
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/actions/importer/normalizer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/actions/importer/normalizer.js b/app/javascript/mastodon/actions/importer/normalizer.js
index 5002292b9..6b79e1f16 100644
--- a/app/javascript/mastodon/actions/importer/normalizer.js
+++ b/app/javascript/mastodon/actions/importer/normalizer.js
@@ -71,7 +71,7 @@ export function normalizeStatus(status, normalOldStatus) {
     }
 
     const spoilerText   = normalStatus.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');
     const emojiMap      = makeEmojiMap(normalStatus);
 
     normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;