feat: implement actual webhook delivery

Implement full webhook delivery functionality:
- Create SendWebhookJob to handle HTTP POST requests
- Update WebhookChannel to dispatch webhook jobs
- Configure retry logic (5 attempts, 10s backoff)
- Update Test notification payload with success/message structure

Webhook payload structure:
{
  "success": true/false,
  "message": "notification message",
  "event": "event_type",
  "url": "coolify_dashboard_url"
}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2025-10-10 17:59:17 +02:00
parent 729c891542
commit 413dee5d8c
3 changed files with 50 additions and 12 deletions

View File

@@ -2,8 +2,8 @@
namespace App\Notifications\Channels;
use App\Jobs\SendWebhookJob;
use Illuminate\Notifications\Notification;
use Illuminate\Support\Facades\Log;
class WebhookChannel
{
@@ -18,16 +18,8 @@ class WebhookChannel
return;
}
// TODO: Implement actual webhook delivery
// This is a placeholder implementation
// You'll need to:
// 1. Get the webhook payload from $notification->toWebhook()
// 2. Create a job to send the HTTP POST request to $webhookSettings->webhook_url
// 3. Handle retries and errors appropriately
$payload = $notification->toWebhook();
Log::info('Webhook notification would be sent', [
'url' => $webhookSettings->webhook_url,
'notification' => get_class($notification),
]);
SendWebhookJob::dispatch($payload, $webhookSettings->webhook_url);
}
}