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:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Delivery;
|
||||
|
||||
use App\Channels\ChannelRegistry;
|
||||
use App\Enums\EventState;
|
||||
use App\Models\Event;
|
||||
use App\Scheduling\DueResolver;
|
||||
@@ -12,6 +13,7 @@ final class EventActions
|
||||
public function __construct(
|
||||
private readonly DueResolver $due,
|
||||
private readonly QuietRule $quiet,
|
||||
private readonly ChannelRegistry $channels,
|
||||
) {}
|
||||
|
||||
/** «Помню»: молчать до следующей контрольной точки текущего состояния. */
|
||||
@@ -35,5 +37,9 @@ final class EventActions
|
||||
$event->state = EventState::Done;
|
||||
$event->done_at = now();
|
||||
$event->save();
|
||||
|
||||
foreach ($event->deliveries()->with('channel')->get() as $delivery) {
|
||||
$this->channels->for($delivery->channel->type)->onDone($event, $delivery);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user