(bug) fix cleanupAccounts emails saying just "undefined undefined"

This commit is contained in:
Andrea Vos 2025-04-19 13:40:08 +02:00
parent 8f6c1cb04f
commit 4f9750c823

View File

@ -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) {