email localization fix

This commit is contained in:
Čarodej
2022-07-15 12:19:48 +02:00
parent bc5300ad6d
commit c323677cfa
10 changed files with 44 additions and 19457 deletions

View File

@@ -15,9 +15,14 @@ class SendViaEmailAction
string $token,
User $user,
): void {
// Get default app locale
$appLocale = get_settings('language') ?? 'en';
foreach ($emails as $email) {
Notification::route('mail', $email)
->notify(new SharedSendViaEmail($token, $user));
->notify(
(new SharedSendViaEmail($token, $user))->locale($appLocale)
);
}
}
}