Sync email team invites, meeting room fixes, Afia, and org settings.
Deploy Ladill Meet / deploy (push) Successful in 47s
Deploy Ladill Meet / deploy (push) Successful in 47s
Publish monorepo meet changes: identity API invites, join/room session fixes, Afia assistant panel, settings nav, and SSO team provisioning. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Services\Meet\SessionService;
|
||||
use App\Services\Meet\WebinarService;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class JoinController extends Controller
|
||||
@@ -50,7 +51,9 @@ class JoinController extends Controller
|
||||
{
|
||||
$request->validate(['passcode' => ['required', 'string']]);
|
||||
|
||||
abort_unless($room->passcode === $request->input('passcode'), 422);
|
||||
if ($room->passcode !== $request->input('passcode')) {
|
||||
return back()->withErrors(['passcode' => 'Incorrect passcode.']);
|
||||
}
|
||||
|
||||
$request->session()->put("meet.passcode.{$room->uuid}", true);
|
||||
|
||||
@@ -63,13 +66,24 @@ class JoinController extends Controller
|
||||
return redirect()->route('meet.join', $room);
|
||||
}
|
||||
|
||||
$validated = $request->validate([
|
||||
'display_name' => ['required_without:auth', 'string', 'max:100'],
|
||||
$rules = [
|
||||
'email' => ['nullable', 'email'],
|
||||
]);
|
||||
];
|
||||
|
||||
if ($request->user()) {
|
||||
$rules['display_name'] = ['nullable', 'string', 'max:100'];
|
||||
} else {
|
||||
$rules['display_name'] = ['required', 'string', 'max:100'];
|
||||
}
|
||||
|
||||
try {
|
||||
$validated = $request->validate($rules);
|
||||
} catch (ValidationException $e) {
|
||||
throw $e->redirectTo(route('meet.join', $room));
|
||||
}
|
||||
|
||||
$user = $request->user();
|
||||
$displayName = $user?->name ?? $validated['display_name'];
|
||||
$displayName = $user?->name ?? ($validated['display_name'] ?? 'Guest');
|
||||
$email = $user?->email ?? ($validated['email'] ?? null);
|
||||
|
||||
[$allowed, $reason] = $this->security->canJoin($room, $user, $email ?? $displayName.'@guest.local');
|
||||
@@ -86,12 +100,16 @@ class JoinController extends Controller
|
||||
} 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 {
|
||||
abort_unless($room->activeSession(), 422, 'Meeting has not started yet.');
|
||||
$session = $room->activeSession();
|
||||
}
|
||||
} else {
|
||||
abort_unless($room->activeSession(), 422, 'Meeting has not started yet. Please wait for the host.');
|
||||
if (! $room->activeSession()) {
|
||||
return back()->withErrors(['join' => 'Meeting has not started yet. Please wait for the host.']);
|
||||
}
|
||||
|
||||
$session = $room->activeSession();
|
||||
}
|
||||
|
||||
@@ -116,7 +134,7 @@ class JoinController extends Controller
|
||||
|
||||
app(InvitationService::class)->markAcceptedOnJoin($room, $user, $email);
|
||||
|
||||
$request->session()->put("meet.participant.{$session->uuid}", $participant->uuid);
|
||||
$this->sessions->rememberParticipantSession($request, $participant, $session);
|
||||
|
||||
return redirect()->route('meet.room', $session);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user