Skip to content

Commit

Permalink
Fix media descriptions not being used for client-side filtering (mast…
Browse files Browse the repository at this point in the history
…odon#17206)

Fix oversight in mastodon#13837
  • Loading branch information
ClearlyClaire authored and jesseplusplus committed Feb 10, 2022
1 parent 9981be6 commit 5b5741c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/actions/importer/normalizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5b5741c

Please sign in to comment.