Improve conferences, guest entry, Afia, and cross-app scheduling.
Deploy Ladill Meet / deploy (push) Successful in 50s
Deploy Ladill Meet / deploy (push) Successful in 50s
Route guests through silent SSO to the Meet product page, fix Afia context query, add conference green-room UX and copy, and extend service API for Care/CRM/Invoice calendar integration. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -20,35 +20,54 @@ class CalendarService
|
||||
|
||||
public function syncRoomCreated(Room $room, User $host): void
|
||||
{
|
||||
$connection = $this->connectionFor($host);
|
||||
if (! $connection) {
|
||||
if (! $room->scheduled_at) {
|
||||
return;
|
||||
}
|
||||
|
||||
$eventId = $this->provider($connection)->createEvent($connection, $room, $host);
|
||||
if ($eventId) {
|
||||
$room->update(['calendar_event_id' => $eventId]);
|
||||
if ($host->email) {
|
||||
$eventId = $this->mail->createEventForMailbox($host->email, $room);
|
||||
if ($eventId) {
|
||||
$room->update(['calendar_event_id' => $eventId]);
|
||||
}
|
||||
}
|
||||
|
||||
$connection = $this->connectionFor($host);
|
||||
if ($connection && in_array($connection->provider, ['google', 'microsoft'], true)) {
|
||||
$this->provider($connection)->createEvent($connection, $room, $host);
|
||||
}
|
||||
}
|
||||
|
||||
public function syncRoomUpdated(Room $room, User $host): void
|
||||
{
|
||||
$connection = $this->connectionFor($host);
|
||||
if (! $connection || ! $room->calendar_event_id) {
|
||||
if (! $room->scheduled_at) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->provider($connection)->updateEvent($connection, $room, $host);
|
||||
if ($host->email) {
|
||||
if ($room->calendar_event_id) {
|
||||
$this->mail->updateEventForMailbox($host->email, $room);
|
||||
} else {
|
||||
$this->syncRoomCreated($room, $host);
|
||||
}
|
||||
}
|
||||
|
||||
$connection = $this->connectionFor($host);
|
||||
if ($connection && $room->calendar_event_id && in_array($connection->provider, ['google', 'microsoft'], true)) {
|
||||
$this->provider($connection)->updateEvent($connection, $room, $host);
|
||||
}
|
||||
}
|
||||
|
||||
public function syncRoomCancelled(Room $room, User $host): void
|
||||
{
|
||||
if ($host->email && $room->calendar_event_id) {
|
||||
$this->mail->deleteEventForMailbox($host->email, $room);
|
||||
}
|
||||
|
||||
$connection = $this->connectionFor($host);
|
||||
if (! $connection || ! $room->calendar_event_id) {
|
||||
return;
|
||||
if ($connection && $room->calendar_event_id && in_array($connection->provider, ['google', 'microsoft'], true)) {
|
||||
$this->provider($connection)->deleteEvent($connection, $room);
|
||||
}
|
||||
|
||||
$this->provider($connection)->deleteEvent($connection, $room);
|
||||
$room->update(['calendar_event_id' => null]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user