mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Various code cleanup
This commit is contained in:
@@ -46,7 +46,7 @@ class AdminEventHandler
|
||||
*/
|
||||
public function sendInvitationNotification(InvitationCreated $event): void
|
||||
{
|
||||
$sendMail = FireflyConfig::get('notification_invite_created', true)->data;
|
||||
$sendMail = app('fireflyconfig')->get('notification_invite_created', true)->data;
|
||||
if (false === $sendMail) {
|
||||
return;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ class AdminEventHandler
|
||||
if ($repository->hasRole($user, 'owner')) {
|
||||
try {
|
||||
Notification::send($user, new UserInvitation($event->invitee));
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) { // @phpstan-ignore-line
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
|
||||
@@ -84,7 +84,7 @@ class AdminEventHandler
|
||||
*/
|
||||
public function sendNewVersion(NewVersionAvailable $event): void
|
||||
{
|
||||
$sendMail = FireflyConfig::get('notification_new_version', true)->data;
|
||||
$sendMail = app('fireflyconfig')->get('notification_new_version', true)->data;
|
||||
if (false === $sendMail) {
|
||||
return;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ class AdminEventHandler
|
||||
if ($repository->hasRole($user, 'owner')) {
|
||||
try {
|
||||
Notification::send($user, new VersionCheckResult($event->message));
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) { // @phpstan-ignore-line
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
|
||||
@@ -130,7 +130,7 @@ class AdminEventHandler
|
||||
}
|
||||
try {
|
||||
Notification::send($event->user, new TestNotification($event->user->email));
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception $e) { // @phpstan-ignore-line
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
|
||||
|
Reference in New Issue
Block a user