Show billing errors on join page instead of 503 screen.
Deploy Ladill Meet / deploy (push) Successful in 50s
Deploy Ladill Meet / deploy (push) Successful in 50s
Wallet and billing gate failures redirect back to the join form with a clear message. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -123,26 +123,34 @@ class JoinController extends Controller
|
||||
return back()->withErrors(['join' => $reason ?? 'Unable to join meeting.']);
|
||||
}
|
||||
|
||||
if ($room->isLive() && $room->activeSession()) {
|
||||
$session = $room->activeSession();
|
||||
} elseif ($room->isTownHall() && $user && $user->ownerRef() === $room->host_user_ref && $room->setting('green_room')) {
|
||||
$session = app(\App\Services\Meet\TownHallService::class)->startGreenRoom($room, $user);
|
||||
} elseif ($user && $user->ownerRef() === $room->host_user_ref) {
|
||||
$session = $this->sessions->start($room, $user);
|
||||
} elseif ($room->setting('join_before_host') || ($user && $user->ownerRef() === $room->host_user_ref)) {
|
||||
if (! $room->activeSession() && $user && $user->ownerRef() === $room->host_user_ref) {
|
||||
try {
|
||||
if ($room->isLive() && $room->activeSession()) {
|
||||
$session = $room->activeSession();
|
||||
} elseif ($room->isTownHall() && $user && $user->ownerRef() === $room->host_user_ref && $room->setting('green_room')) {
|
||||
$session = app(\App\Services\Meet\TownHallService::class)->startGreenRoom($room, $user);
|
||||
} elseif ($user && $user->ownerRef() === $room->host_user_ref) {
|
||||
$session = $this->sessions->start($room, $user);
|
||||
} elseif (! $room->activeSession()) {
|
||||
return back()->withErrors(['join' => 'Meeting has not started yet. Please wait for the host.']);
|
||||
} elseif ($room->setting('join_before_host') || ($user && $user->ownerRef() === $room->host_user_ref)) {
|
||||
if (! $room->activeSession() && $user && $user->ownerRef() === $room->host_user_ref) {
|
||||
$session = $this->sessions->start($room, $user);
|
||||
} elseif (! $room->activeSession()) {
|
||||
return back()->withErrors(['join' => 'Meeting has not started yet. Please wait for the host.']);
|
||||
} else {
|
||||
$session = $room->activeSession();
|
||||
}
|
||||
} else {
|
||||
if (! $room->activeSession()) {
|
||||
return back()->withErrors(['join' => 'Meeting has not started yet. Please wait for the host.']);
|
||||
}
|
||||
|
||||
$session = $room->activeSession();
|
||||
}
|
||||
} else {
|
||||
if (! $room->activeSession()) {
|
||||
return back()->withErrors(['join' => 'Meeting has not started yet. Please wait for the host.']);
|
||||
} catch (\Symfony\Component\HttpKernel\Exception\HttpException $e) {
|
||||
if (in_array($e->getStatusCode(), [402, 503], true)) {
|
||||
return back()->withErrors(['join' => $e->getMessage() ?: 'Unable to start meeting.']);
|
||||
}
|
||||
|
||||
$session = $room->activeSession();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$role = ($user && $user->ownerRef() === $room->host_user_ref) ? 'host' : 'guest';
|
||||
|
||||
Reference in New Issue
Block a user