feat: web, webhook and telegram channel drivers
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BCrwHHnGCB5XH968Nxokqw
This commit is contained in:
23
core/app/Channels/DeliveryOutcome.php
Normal file
23
core/app/Channels/DeliveryOutcome.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Channels;
|
||||
|
||||
final class DeliveryOutcome
|
||||
{
|
||||
private function __construct(
|
||||
public readonly bool $ok,
|
||||
public readonly ?string $error,
|
||||
/** @var array<string,mixed> служебное канала, ляжет в deliveries.meta */
|
||||
public readonly array $meta,
|
||||
) {}
|
||||
|
||||
public static function ok(array $meta = []): self
|
||||
{
|
||||
return new self(true, null, $meta);
|
||||
}
|
||||
|
||||
public static function failed(string $error): self
|
||||
{
|
||||
return new self(false, $error, []);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user