Promote Events speakers from attendee to panelist on rejoin.
Deploy Ladill Meet / deploy (push) Successful in 1m7s

Upgrade existing participant roles when a verified speaker token is present, and sync panelist access while already in the room so speaker-panel placement and publish rights apply.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-03 18:05:15 +00:00
co-authored by Cursor
parent f9c82d0d1f
commit 3d68f7a83b
3 changed files with 91 additions and 7 deletions
+42
View File
@@ -225,6 +225,48 @@ class EventsJoinGateTest extends TestCase
]);
}
public function test_speaker_rejoin_promotes_existing_attendee_to_panelist(): void
{
$room = $this->createEventsLinkedRoom('town_hall', [
'settings' => array_merge(config('meet.default_settings'), [
'join_before_host' => true,
'waiting_room' => false,
]),
]);
$session = Session::create([
'owner_ref' => $this->user->public_id,
'room_id' => $room->id,
'media_room_name' => 'room-'.$room->uuid,
'status' => 'live',
'started_at' => now(),
]);
$room->update(['status' => 'live']);
\App\Models\Participant::create([
'owner_ref' => $this->user->public_id,
'session_id' => $session->id,
'display_name' => 'Keynote Speaker',
'email' => 'speaker@example.com',
'role' => 'attendee',
'status' => 'joined',
'joined_at' => now(),
]);
$this->get('/r/'.$room->uuid.'?speaker=speaker-token-123')
->assertRedirect(route('meet.join', $room));
$this->post('/r/'.$room->uuid.'/enter', [
'display_name' => 'Keynote Speaker',
])->assertRedirect(route('meet.room', $session));
$this->assertDatabaseHas('meet_participants', [
'session_id' => $session->id,
'email' => 'speaker@example.com',
'role' => 'panelist',
]);
}
/** @param array<string, mixed> $overrides */
protected function createEventsLinkedRoom(string $type, array $overrides = []): Room
{