diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-12-28 23:25:50 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-01-07 19:54:58 +0100 |
commit | af86c7a5ded69cf8aee3ff70504c383155e40fde (patch) | |
tree | d5ba55bf888811115f48d34b52485748e21ea039 /app/javascript/flavours/glitch/actions/importer | |
parent | fca50e4b50d8b2007fa733c7b732aeab6b2092d7 (diff) |
[Glitch] Fix media descriptions not being used for client-side filtering
Port 37e80994f81bdb07e31f1a55cd37c967822a1a2a to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/actions/importer')
-rw-r--r-- | app/javascript/flavours/glitch/actions/importer/normalizer.js | 2 |
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 9b3bd0d56..3995585f6 100644 --- a/app/javascript/flavours/glitch/actions/importer/normalizer.js +++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js @@ -62,7 +62,7 @@ export function normalizeStatus(status, normalOldStatus) { normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml'); } else { 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; |