Redirect participants to meeting ended screen instead of 404.
Deploy Ladill Meet / deploy (push) Successful in 49s
Deploy Ladill Meet / deploy (push) Successful in 49s
Poll and waiting-room clients follow the same redirect when the host ends the call; chat and participants use mobile bottom sheets. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,7 +30,9 @@ class MeetingRoomController extends Controller
|
||||
|
||||
public function show(Request $request, Session $session): View|RedirectResponse
|
||||
{
|
||||
abort_unless($session->isLive(), 404, 'Meeting has ended.');
|
||||
if (! $session->isLive()) {
|
||||
return redirect()->route('meet.ended', $session);
|
||||
}
|
||||
|
||||
$participantUuid = $request->session()->get("meet.participant.{$session->uuid}");
|
||||
abort_unless($participantUuid, 403, 'Please join the meeting first.');
|
||||
@@ -156,6 +158,13 @@ class MeetingRoomController extends Controller
|
||||
|
||||
public function poll(Request $request, Session $session): JsonResponse
|
||||
{
|
||||
if (! $session->isLive()) {
|
||||
return response()->json([
|
||||
'ended' => true,
|
||||
'redirect' => route('meet.ended', $session),
|
||||
]);
|
||||
}
|
||||
|
||||
$this->currentParticipant($request, $session);
|
||||
|
||||
$session->load(['participants' => fn ($q) => $q->whereIn('status', ['joined', 'waiting'])]);
|
||||
|
||||
Reference in New Issue
Block a user