Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/V4/OpenViduController.php
Show First 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | public function joinRoom($id) | ||||
$session = $room->createSession(); | $session = $room->createSession(); | ||||
if (empty($session)) { | if (empty($session)) { | ||||
return $this->errorResponse(500, \trans('meet.session-create-error')); | return $this->errorResponse(500, \trans('meet.session-create-error')); | ||||
} | } | ||||
} | } | ||||
$password = (string) $room->getSetting('password'); | $settings = $room->getSettings(['locked', 'nomedia', 'password']); | ||||
$password = (string) $settings['password']; | |||||
$config = [ | $config = [ | ||||
'locked' => $room->getSetting('locked') === 'true', | 'locked' => $settings['locked'] === 'true', | ||||
'nomedia' => $room->getSetting('nomedia') === 'true', | 'nomedia' => $settings['nomedia'] === 'true', | ||||
'password' => $isOwner ? $password : '', | 'password' => $isOwner ? $password : '', | ||||
'requires_password' => !$isOwner && strlen($password), | 'requires_password' => !$isOwner && strlen($password), | ||||
]; | ]; | ||||
$response = ['config' => $config]; | $response = ['config' => $config]; | ||||
// Validate room password | // Validate room password | ||||
if (!$isOwner && strlen($password)) { | if (!$isOwner && strlen($password)) { | ||||
▲ Show 20 Lines • Show All 329 Lines • Show Last 20 Lines |