refactor: single EventPresenter and ManualEvents shared by /api, /me, inbox, webhook; editable flag

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCrwHHnGCB5XH968Nxokqw
This commit is contained in:
nikita.hohlov
2026-09-05 06:01:55 -03:00
parent 2ec71ab710
commit 9163ff97f9
10 changed files with 297 additions and 75 deletions

View File

@@ -3,10 +3,10 @@
namespace App\Channels;
use App\Enums\Presence;
use App\Http\Controllers\Api\EventsController as Presenter;
use App\Models\Delivery;
use App\Models\Event;
use App\Models\User;
use App\Presenters\EventPresenter;
use Illuminate\Support\Facades\Http;
use Throwable;
@@ -48,7 +48,7 @@ final class WebhookChannel implements ChannelDriver
/** @return array<string,mixed> */
public static function payload(Event $event, Delivery $delivery): array
{
$presented = Presenter::present($event);
$presented = EventPresenter::forClient($event);
return [
'event' => [