Add live speaker invites for audio rooms and simplify the toolbar.
Deploy Ladill Meet / deploy (push) Successful in 1m9s
Deploy Ladill Meet / deploy (push) Successful in 1m9s
Let hosts promote raised-hand listeners from People, remove the empty More menu in spaces, and put People and recording on the bottom bar. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -71,4 +71,54 @@ class SpaceService
|
||||
'lock',
|
||||
], true);
|
||||
}
|
||||
|
||||
public function promoteToSpeaker(Room $room, Participant $participant): Participant
|
||||
{
|
||||
abort_unless($room->isSpace(), 422);
|
||||
abort_unless(in_array($participant->role, ['attendee', 'guest', 'participant'], true), 422);
|
||||
|
||||
$participant->update([
|
||||
'role' => 'panelist',
|
||||
'hand_raised' => false,
|
||||
]);
|
||||
|
||||
if ($participant->user_ref) {
|
||||
$speakerRefs = collect((array) $room->setting('speaker_refs', []))
|
||||
->push($participant->user_ref)
|
||||
->unique()
|
||||
->values()
|
||||
->all();
|
||||
|
||||
$room->update([
|
||||
'settings' => array_merge($room->settings ?? [], [
|
||||
'speaker_refs' => $speakerRefs,
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
return $participant->fresh();
|
||||
}
|
||||
|
||||
public function demoteFromSpeaker(Room $room, Participant $participant): Participant
|
||||
{
|
||||
abort_unless($room->isSpace(), 422);
|
||||
abort_unless($participant->role === 'panelist', 422);
|
||||
|
||||
$participant->update(['role' => 'attendee']);
|
||||
|
||||
if ($participant->user_ref) {
|
||||
$speakerRefs = collect((array) $room->setting('speaker_refs', []))
|
||||
->reject(fn (string $ref) => $ref === $participant->user_ref)
|
||||
->values()
|
||||
->all();
|
||||
|
||||
$room->update([
|
||||
'settings' => array_merge($room->settings ?? [], [
|
||||
'speaker_refs' => $speakerRefs,
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
return $participant->fresh();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user