mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-19 11:20:56 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user