mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-06-09 03:44:57 +00:00
Add slack support to Firefly III
This commit is contained in:
@@ -25,6 +25,7 @@ namespace FireflyIII\Notifications\Admin;
|
||||
use FireflyIII\Mail\AdminTestMail;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
/**
|
||||
@@ -54,7 +55,7 @@ class TestNotification extends Notification
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
return ['mail', 'slack'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,6 +70,16 @@ class TestNotification extends Notification
|
||||
->markdown('emails.admin-test', ['email' => $this->address])
|
||||
->subject((string) trans('email.admin_test_subject'));
|
||||
}
|
||||
/**
|
||||
* Get the Slack representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return SlackMessage
|
||||
*/
|
||||
public function toSlack($notifiable)
|
||||
{
|
||||
return (new SlackMessage)->content((string)trans('email.admin_test_subject'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
|
||||
Reference in New Issue
Block a user