url, PHP_URL_HOST) . '/api/v1/timelines/public'; $params = $lastSeenId !== null ? ['min_id' => $lastSeenId] : []; $response = Http::withHeaders([ 'User-Agent' => config('fedi-discover.http.user_agent'), ])->timeout(config('fedi-discover.http.timeout'))->get($url, $params); if (! $response->successful()) { return collect(); } return collect($response->json() ?? []) ->map(fn (array $t) => new FediversePost( cursorId: $t['id'], selfUrl: $t['url'] ?? $t['uri'] ?? null, body: $t['content'], publishedAt: $t['created_at'] ?? null )); } }