Skip to content

Commit

Permalink
fixup! fixup! fixup! Port breach alert email to new email template
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinnl committed Aug 1, 2024
1 parent 2659b15 commit defb29c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/functions/l10n/cronjobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function getRootDir(currentDir = dirname(fileURLToPath(import.meta.url))) {
return getRootDir(resolve(currentDir, "../"));
}

export const getL10n: GetL10n = createGetL10n({
const getL10n: GetL10n = createGetL10n({
getL10nBundles: getL10nBundles,
ReactLocalization: ReactLocalization,
parseMarkup: parseMarkup,
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/cronjobs/emailBreachAlerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
import { getEnabledFeatureFlags } from "../../db/tables/featureFlags";
import { renderEmail } from "../../emails/renderEmail";
import { BreachAlertEmail } from "../../emails/templates/breachAlert/BreachAlertEmail";
import { getL10n } from "../../app/functions/l10n/cronjobs";
import { getEmailL10n } from "../../app/functions/l10n/cronjobs";

const SENTRY_SLUG = "cron-breach-alerts";

Expand Down Expand Up @@ -285,7 +285,7 @@ export async function poll(
const enabledFlags = await getEnabledFeatureFlags({
email: recipient.primary_email,
});
const l10n = getL10n(recipient.signup_language ?? undefined);
const l10n = getEmailL10n(recipient);

Check failure on line 288 in src/scripts/cronjobs/emailBreachAlerts.tsx

View workflow job for this annotation

GitHub Actions / npm-lint

Argument of type 'SubscriberRow | (SubscriberRow & EmailAddressRow)' is not assignable to parameter of type 'SanitizedSubscriberRow'.
const subject = l10n.getString("breach-alert-subject");

await sendEmail(
Expand Down

0 comments on commit defb29c

Please sign in to comment.