mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 08:18:08 +00:00
feat: slack notifications
This commit is contained in:
1 parent
9af3fe9c97
commit
eb0686fe20
27 files changed
+822
-181
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications\Channels;
|
||||
|
||||
use App\Jobs\SendMessageToSlackJob;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class SlackChannel
|
||||
{
|
||||
/**
|
||||
* Send the given notification.
|
||||
*/
|
||||
public function send(SendsSlack $notifiable, Notification $notification): void
|
||||
{
|
||||
$message = $notification->toSlack();
|
||||
$webhookUrl = $notifiable->routeNotificationForSlack();
|
||||
if (!$webhookUrl) {
|
||||
return;
|
||||
}
|
||||
dispatch(new SendMessageToSlackJob($message, $webhookUrl))->onQueue('high');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user