Redirect participants to meeting ended screen instead of 404.
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:
isaacclad
2026-07-01 14:43:39 +00:00
co-authored by Cursor
parent 57356be9b6
commit 322f96b367
11 changed files with 398 additions and 35 deletions
+88
View File
@@ -251,6 +251,94 @@ class MeetWebTest extends TestCase
->assertRedirect(route('meet.left', $session));
}
public function test_participant_redirected_to_ended_page_when_meeting_ended(): void
{
$room = $this->createRoom(['settings' => array_merge(config('meet.default_settings'), ['waiting_room' => false])]);
$session = Session::create([
'owner_ref' => $this->user->public_id,
'room_id' => $room->id,
'media_room_name' => 'room-'.$room->uuid,
'status' => 'ended',
'started_at' => now()->subHour(),
'ended_at' => now(),
]);
$room->update(['status' => 'ended']);
$participant = \App\Models\Participant::create([
'owner_ref' => $this->user->public_id,
'session_id' => $session->id,
'display_name' => 'Guest',
'role' => 'guest',
'status' => 'left',
'joined_at' => now()->subHour(),
'left_at' => now(),
]);
$this->withSession(["meet.participant.{$session->uuid}" => $participant->uuid])
->get('/room/'.$session->uuid)
->assertRedirect(route('meet.ended', $session));
}
public function test_poll_returns_ended_payload_when_meeting_ended(): void
{
$room = $this->createRoom();
$session = Session::create([
'owner_ref' => $this->user->public_id,
'room_id' => $room->id,
'media_room_name' => 'room-'.$room->uuid,
'status' => 'ended',
'started_at' => now()->subHour(),
'ended_at' => now(),
]);
$participant = \App\Models\Participant::create([
'owner_ref' => $this->user->public_id,
'session_id' => $session->id,
'display_name' => 'Guest',
'role' => 'guest',
'status' => 'left',
'joined_at' => now()->subHour(),
'left_at' => now(),
]);
$this->withSession(["meet.participant.{$session->uuid}" => $participant->uuid])
->getJson('/room/'.$session->uuid.'/poll')
->assertOk()
->assertJson([
'ended' => true,
'redirect' => route('meet.ended', $session),
]);
}
public function test_waiting_guest_redirected_when_host_ends_meeting(): void
{
$room = $this->createRoom(['settings' => array_merge(config('meet.default_settings'), ['waiting_room' => true])]);
$session = Session::create([
'owner_ref' => $this->user->public_id,
'room_id' => $room->id,
'media_room_name' => 'room-'.$room->uuid,
'status' => 'ended',
'started_at' => now()->subHour(),
'ended_at' => now(),
]);
$room->update(['status' => 'ended']);
$participant = \App\Models\Participant::create([
'owner_ref' => $this->user->public_id,
'session_id' => $session->id,
'display_name' => 'Waiting Guest',
'role' => 'guest',
'status' => 'left',
'joined_at' => now()->subHour(),
'left_at' => now(),
]);
$this->withSession(["meet.participant.{$session->uuid}" => $participant->uuid])
->getJson('/r/'.$room->uuid.'/waiting/status')
->assertOk()
->assertJson([
'ended' => true,
'redirect' => route('meet.ended', $session),
]);
}
public function test_authenticated_user_can_join_live_meeting_without_display_name(): void
{
$room = $this->createRoom();