diff --git a/server/cleanupAccounts.js b/server/cleanupAccounts.js index d92b65faf..b4689d247 100644 --- a/server/cleanupAccounts.js +++ b/server/cleanupAccounts.js @@ -38,6 +38,8 @@ async function warnInactive(db) { console.log(users.length); + const translator = await loadTranslator('en'); + for (const user of users) { console.log('warn', user); if (!execute) { @@ -58,7 +60,7 @@ async function warnInactive(db) { if (userRefreshed.bannedReason !== null) { continue; } - await mailer(userRefreshed.email, 'inactivityWarning', await loadTranslator('_'), { + await mailer(userRefreshed.email, 'inactivityWarning', translator, { username: userRefreshed.username, }); } catch (error) {