mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Import statements and update configuration.
This commit is contained in:
		| @@ -37,6 +37,7 @@ use FireflyIII\Notifications\Test\OwnerTestNotificationPushover; | ||||
| use FireflyIII\Notifications\Test\OwnerTestNotificationSlack; | ||||
| use Illuminate\Support\Facades\Log; | ||||
| use Illuminate\Support\Facades\Notification; | ||||
| use Exception; | ||||
| 
 | ||||
| /** | ||||
|  * Class AdminEventHandler. | ||||
| @@ -52,7 +53,7 @@ class AdminEventHandler | ||||
| 
 | ||||
|         try { | ||||
|             Notification::send(new OwnerNotifiable(), new UserInvitation($event->invitee)); | ||||
|         } catch (\Exception $e) { | ||||
|         } catch (Exception $e) { | ||||
|             $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.'); | ||||
| @@ -74,7 +75,7 @@ class AdminEventHandler | ||||
|         try { | ||||
|             $owner = new OwnerNotifiable(); | ||||
|             Notification::send($owner, new UnknownUserLoginAttempt($event->address)); | ||||
|         } catch (\Exception $e) { | ||||
|         } catch (Exception $e) { | ||||
|             $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.'); | ||||
| @@ -104,7 +105,7 @@ class AdminEventHandler | ||||
|         try { | ||||
|             $owner = new OwnerNotifiable(); | ||||
|             Notification::send($owner, new VersionCheckResult($event->message)); | ||||
|         } catch (\Exception $e) { | ||||
|         } catch (Exception $e) { | ||||
|             $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.'); | ||||
| @@ -158,7 +159,7 @@ class AdminEventHandler | ||||
| 
 | ||||
|         try { | ||||
|             Notification::send($event->owner, new $class()); | ||||
|         } catch (\Exception $e) { | ||||
|         } catch (Exception $e) { | ||||
|             $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