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:
@@ -252,6 +252,36 @@ class MeetingRoomController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function promoteSpaceSpeaker(Request $request, Session $session, Participant $participant): JsonResponse
|
||||
{
|
||||
$actor = $this->currentParticipant($request, $session);
|
||||
abort_unless($participant->session_id === $session->id, 404);
|
||||
abort_unless($session->room->isSpace(), 404);
|
||||
abort_unless($actor->isHost() || ($request->user() && $request->user()->ownerRef() === $session->room->host_user_ref), 403);
|
||||
|
||||
$updated = app(SpaceService::class)->promoteToSpeaker($session->room, $participant);
|
||||
$avatars = ParticipantPresenter::avatarMap($session->participants()->get(), $session->room->host_user_ref);
|
||||
|
||||
return response()->json([
|
||||
'participant' => ParticipantPresenter::toArray($updated, $avatars, $session->room->host_user_ref),
|
||||
]);
|
||||
}
|
||||
|
||||
public function demoteSpaceSpeaker(Request $request, Session $session, Participant $participant): JsonResponse
|
||||
{
|
||||
$actor = $this->currentParticipant($request, $session);
|
||||
abort_unless($participant->session_id === $session->id, 404);
|
||||
abort_unless($session->room->isSpace(), 404);
|
||||
abort_unless($actor->isHost() || ($request->user() && $request->user()->ownerRef() === $session->room->host_user_ref), 403);
|
||||
|
||||
$updated = app(SpaceService::class)->demoteFromSpeaker($session->room, $participant);
|
||||
$avatars = ParticipantPresenter::avatarMap($session->participants()->get(), $session->room->host_user_ref);
|
||||
|
||||
return response()->json([
|
||||
'participant' => ParticipantPresenter::toArray($updated, $avatars, $session->room->host_user_ref),
|
||||
]);
|
||||
}
|
||||
|
||||
public function sendMessage(Request $request, Session $session): JsonResponse
|
||||
{
|
||||
abort_unless(app(SpaceService::class)->allowsRoomFeature($session->room, 'chat'), 422);
|
||||
|
||||
Reference in New Issue
Block a user