fix notifications (#109)

This commit is contained in:
Saeed Vaziry
2024-02-16 21:54:51 +01:00
committed by GitHub
parent f70963d6bb
commit 9db310a06b
14 changed files with 20 additions and 12 deletions

View File

@ -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),