Skip to content

Commit

Permalink
Fix media descriptions not being used for client-side filtering
Browse files Browse the repository at this point in the history
Fix oversight in mastodon#13837
  • Loading branch information
ClearlyClaire committed Dec 28, 2021
1 parent fe71548 commit 7b177fe
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 7b177fe

Please sign in to comment.