Route webinar and conference registration through Ladill Events.
Deploy Ladill Meet / deploy (push) Successful in 1m26s
Deploy Ladill Meet / deploy (push) Successful in 1m26s
Add Events linking UI and service client, remove Meet-native registration and invitation flows for these room types, and redirect attendees to Events registration when joining. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,7 +11,7 @@ use App\Services\Meet\InvitationService;
|
||||
use App\Services\Meet\SecurityPolicyService;
|
||||
use App\Services\Meet\SessionService;
|
||||
use App\Services\Meet\SpaceService;
|
||||
use App\Services\Meet\WebinarService;
|
||||
use App\Support\EventsSourceLink;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -23,7 +23,6 @@ class JoinController extends Controller
|
||||
public function __construct(
|
||||
protected SessionService $sessions,
|
||||
protected SecurityPolicyService $security,
|
||||
protected WebinarService $webinars,
|
||||
protected SpaceService $spaces,
|
||||
protected ConferenceService $conferences,
|
||||
) {}
|
||||
@@ -165,19 +164,35 @@ class JoinController extends Controller
|
||||
$role = $this->spaces->resolveJoinRole($room, $user, $role);
|
||||
} elseif ($room->isConference() && $role !== 'host') {
|
||||
$role = $this->conferences->resolveJoinRole($room, $user, $email, $role);
|
||||
} elseif ($room->isWebinar() && $role !== 'host') {
|
||||
$token = $request->session()->get("meet.webinar.{$room->uuid}");
|
||||
$reg = $token
|
||||
? $this->webinars->findByAccessToken($token)
|
||||
: ($email ? $this->webinars->findApprovedRegistration($room, $email) : null);
|
||||
|
||||
if (! $reg) {
|
||||
return redirect()->route('meet.webinar.register', $room)
|
||||
->withErrors(['register' => 'Approved registration is required for this webinar.']);
|
||||
if ($role === 'attendee' && $room->isEventsLinked()) {
|
||||
$joinEmail = $email ?? $user?->email;
|
||||
if (! $room->hasEventsRegistrationInvite($joinEmail)) {
|
||||
$registrationUrl = EventsSourceLink::eventRegistrationUrl($room);
|
||||
|
||||
return $registrationUrl
|
||||
? redirect()->away($registrationUrl)
|
||||
: back()->withErrors(['join' => 'Register for this conference in Ladill Events before joining.']);
|
||||
}
|
||||
}
|
||||
} elseif ($room->isWebinar() && $role !== 'host') {
|
||||
if ($room->isEventsLinked()) {
|
||||
$joinEmail = $email ?? $user?->email;
|
||||
if (! $room->hasEventsRegistrationInvite($joinEmail)) {
|
||||
$registrationUrl = EventsSourceLink::eventRegistrationUrl($room);
|
||||
|
||||
$role = 'attendee';
|
||||
$displayName = $reg->display_name;
|
||||
return $registrationUrl
|
||||
? redirect()->away($registrationUrl)
|
||||
: back()->withErrors(['join' => 'Register for this webinar in Ladill Events before joining.']);
|
||||
}
|
||||
|
||||
$role = 'attendee';
|
||||
$displayName = $displayName ?? $user?->name;
|
||||
} else {
|
||||
return back()->withErrors([
|
||||
'join' => 'This webinar must be linked to a Ladill Events event before attendees can register and join.',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($room->isConference() && ! $this->conferences->canJoinSession($room, $session, $role)) {
|
||||
|
||||
Reference in New Issue
Block a user