2026-04-24 21:55:57 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Lvl0\FediDiscover\Events;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
|
|
|
use Illuminate\Broadcasting\PrivateChannel;
|
|
|
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
|
|
|
|
class UrlDiscovered
|
|
|
|
|
{
|
|
|
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
|
|
|
|
|
|
public function __construct(
|
|
|
|
|
public string $url,
|
2026-04-25 02:09:38 +02:00
|
|
|
public ?string $postUrl = null,
|
|
|
|
|
public ?string $postBody = null
|
2026-04-24 21:55:57 +02:00
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
public function broadcastOn(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
new PrivateChannel('discovery'),
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|