Update existing Meet rooms by UUID when Events syncs programme data.
Deploy Ladill Meet / deploy (push) Successful in 39s
Deploy Ladill Meet / deploy (push) Successful in 39s
Service API store now resolves meet_room_uuid before source lookup so programme snapshots apply to pre-linked rooms. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -34,6 +34,20 @@ class ServiceRoomController extends Controller
|
||||
$organization = $this->resolveOrganization($validated);
|
||||
abort_unless($organization->owner_ref === $validated['owner_ref'], 403);
|
||||
|
||||
$roomUuid = trim((string) ($validated['meet_room_uuid'] ?? ''));
|
||||
if ($roomUuid !== '') {
|
||||
$existing = Room::query()
|
||||
->where('uuid', $roomUuid)
|
||||
->where('owner_ref', $validated['owner_ref'])
|
||||
->first();
|
||||
|
||||
if ($existing) {
|
||||
return $this->respondWithRoom(
|
||||
$this->persistRoomUpdate($existing, $validated, $organization),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$entityId = (string) ($validated['source']['entity_id'] ?? '');
|
||||
if ($entityId !== '') {
|
||||
$existing = Room::query()
|
||||
@@ -148,6 +162,7 @@ class ServiceRoomController extends Controller
|
||||
'source.event_id' => ['nullable', 'string'],
|
||||
'invite_emails' => ['nullable', 'array'],
|
||||
'invite_emails.*' => ['email'],
|
||||
'meet_room_uuid' => ['nullable', 'string', 'max:64'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user