fix: check if translation exists before processing in background
This commit is contained in:
@@ -507,6 +507,8 @@ DB.getDB.then((DB) => {
|
||||
// To avoid huge translations or mostly-media posts
|
||||
if (post.content.length > 1000) return;
|
||||
|
||||
if (post.translations && post.translations[targetLang]) return;
|
||||
|
||||
const translation = await translateText({
|
||||
text: post.content,
|
||||
sourceLang: "auto",
|
||||
|
||||
Reference in New Issue
Block a user