mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-28 07:43:42 +01:00
[Glitch] Fix reply not preserving the language from the replied-to post
Port 34f3001278
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
92df185be7
commit
987f190839
1 changed files with 4 additions and 1 deletions
|
@ -75,7 +75,10 @@ export function normalizeStatus(status, normalOldStatus, settings) {
|
||||||
normalStatus.contentHtml = normalOldStatus.get('contentHtml');
|
normalStatus.contentHtml = normalOldStatus.get('contentHtml');
|
||||||
normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml');
|
normalStatus.spoilerHtml = normalOldStatus.get('spoilerHtml');
|
||||||
normalStatus.hidden = normalOldStatus.get('hidden');
|
normalStatus.hidden = normalOldStatus.get('hidden');
|
||||||
|
|
||||||
|
if (normalOldStatus.get('translation')) {
|
||||||
normalStatus.translation = normalOldStatus.get('translation');
|
normalStatus.translation = normalOldStatus.get('translation');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const spoilerText = normalStatus.spoiler_text || '';
|
const spoilerText = normalStatus.spoiler_text || '';
|
||||||
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 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');
|
||||||
|
|
Loading…
Reference in a new issue