mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 11:21:02 +00:00
feat: add WebhookChannel placeholder implementation
Add basic WebhookChannel infrastructure: - Create SendsWebhook interface - Create WebhookChannel with placeholder implementation (logs instead of sending) - Update Test notification to support webhook channel - Add WebhookChannel to HasNotificationSettings trait - Add toWebhook() method to Test notification This provides a working foundation that won't break test notifications. The actual HTTP webhook delivery will be implemented in a follow-up. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Notifications\Channels\EmailChannel;
|
||||
use App\Notifications\Channels\PushoverChannel;
|
||||
use App\Notifications\Channels\SlackChannel;
|
||||
use App\Notifications\Channels\TelegramChannel;
|
||||
use App\Notifications\Channels\WebhookChannel;
|
||||
use App\Notifications\Dto\DiscordMessage;
|
||||
use App\Notifications\Dto\PushoverMessage;
|
||||
use App\Notifications\Dto\SlackMessage;
|
||||
@@ -36,7 +37,7 @@ class Test extends Notification implements ShouldQueue
|
||||
'telegram' => [TelegramChannel::class],
|
||||
'slack' => [SlackChannel::class],
|
||||
'pushover' => [PushoverChannel::class],
|
||||
'webhook' => [], // WebhookChannel will be implemented later
|
||||
'webhook' => [WebhookChannel::class],
|
||||
default => [],
|
||||
};
|
||||
} else {
|
||||
@@ -111,4 +112,13 @@ class Test extends Notification implements ShouldQueue
|
||||
description: 'This is a test Slack notification from Coolify.'
|
||||
);
|
||||
}
|
||||
|
||||
public function toWebhook(): array
|
||||
{
|
||||
return [
|
||||
'event' => 'test',
|
||||
'message' => 'This is a test webhook notification from Coolify.',
|
||||
'url' => base_url(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user