Require acceptance for space speak invites and add instant co-host promotion.
Deploy Ladill Meet / deploy (push) Successful in 40s

Remove duplicate host record button on desktop and split invite-to-speak from make co-host so listeners must accept before speaking while co-host is applied immediately.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-04 00:50:58 +00:00
co-authored by Cursor
parent 46af4f93b6
commit 2fae2e7ed8
6 changed files with 338 additions and 14 deletions
+71 -3
View File
@@ -1306,7 +1306,7 @@ class MeetWebTest extends TestCase
$response->assertDontSee('View the room lineup from Events', false);
}
public function test_space_host_can_promote_listener_to_speaker(): void
public function test_space_host_can_invite_listener_to_speak_and_listener_accepts(): void
{
$room = Room::create([
'owner_ref' => $this->user->public_id,
@@ -1357,16 +1357,84 @@ class MeetWebTest extends TestCase
->withSession(["meet.participant.{$session->uuid}" => $host->uuid])
->postJson('/room/'.$session->uuid.'/participants/'.$listener->uuid.'/space/speaker')
->assertOk()
->assertJsonPath('participant.role', 'panelist');
->assertJsonPath('participant.role', 'attendee')
->assertJsonPath('participant.speak_requested', true);
$listener->refresh();
$this->assertSame('attendee', $listener->role);
$this->assertTrue($listener->speak_requested);
$this->assertFalse($listener->hand_raised);
$this->withSession(["meet.participant.{$session->uuid}" => $listener->uuid])
->postJson('/room/'.$session->uuid.'/space/speaker/accept')
->assertOk()
->assertJsonPath('participant.role', 'panelist')
->assertJsonPath('participant.speak_requested', false);
$listener->refresh();
$room->refresh();
$this->assertSame('panelist', $listener->role);
$this->assertFalse($listener->hand_raised);
$this->assertFalse($listener->speak_requested);
$this->assertContains('listener-ref', (array) $room->setting('speaker_refs', []));
}
public function test_space_host_can_make_speaker_co_host_without_acceptance(): void
{
$room = Room::create([
'owner_ref' => $this->user->public_id,
'organization_id' => $this->organization->id,
'host_user_ref' => $this->user->public_id,
'title' => 'Leadership space',
'type' => 'space',
'status' => 'live',
'scheduled_at' => now()->addHour(),
'timezone' => 'UTC',
'settings' => array_merge(config('meet.default_settings'), [
'audio_only' => true,
'speaker_refs' => ['speaker-ref'],
]),
]);
$session = Session::create([
'owner_ref' => $this->user->public_id,
'room_id' => $room->id,
'media_room_name' => 'meet-'.$room->uuid,
'status' => 'live',
'session_mode' => 'live',
'started_at' => now(),
]);
$host = \App\Models\Participant::create([
'owner_ref' => $this->user->public_id,
'session_id' => $session->id,
'user_ref' => $this->user->public_id,
'display_name' => 'Host',
'role' => 'host',
'status' => 'joined',
'joined_at' => now(),
]);
$speaker = \App\Models\Participant::create([
'owner_ref' => $this->user->public_id,
'session_id' => $session->id,
'user_ref' => 'speaker-ref',
'display_name' => 'Speaker',
'role' => 'panelist',
'status' => 'joined',
'joined_at' => now(),
]);
$this->actingAs($this->user)
->withSession(["meet.participant.{$session->uuid}" => $host->uuid])
->postJson('/room/'.$session->uuid.'/participants/'.$speaker->uuid.'/space/co-host')
->assertOk()
->assertJsonPath('participant.role', 'co_host');
$speaker->refresh();
$this->assertSame('co_host', $speaker->role);
}
public function test_breakouts_exclude_host_and_enable_meeting_mode_for_attendees(): void
{
config([