mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
fix notifications (#109)
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace App\NotificationChannels;
|
||||
|
||||
use App\Contracts\Notification;
|
||||
use App\Models\NotificationChannel;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class Slack extends AbstractNotificationChannel
|
||||
@ -60,6 +61,8 @@ private function checkConnection(string $subject, string $text): bool
|
||||
|
||||
public function send(object $notifiable, Notification $notification): void
|
||||
{
|
||||
/** @var NotificationChannel $notifiable */
|
||||
$this->notificationChannel = $notifiable;
|
||||
$data = $this->notificationChannel->data;
|
||||
Http::post($data['webhook_url'], [
|
||||
'text' => $notification->toSlack($notifiable),
|
||||
|
Reference in New Issue
Block a user