Persist Events programme on the room when linking from Meet.
Deploy Ladill Meet / deploy (push) Successful in 46s
Deploy Ladill Meet / deploy (push) Successful in 46s
Store programme_snapshot from the link-room response locally and merge existing room settings on service API updates. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,7 +37,7 @@ class EventsLinkService
|
||||
'virtual_session_id' => $virtualSessionId,
|
||||
]);
|
||||
|
||||
$room->update([
|
||||
$updates = [
|
||||
'source' => [
|
||||
'app' => 'events',
|
||||
'entity_type' => 'virtual_session',
|
||||
@@ -47,7 +47,17 @@ class EventsLinkService
|
||||
'registration_url' => (string) ($result['registration_url'] ?? ''),
|
||||
'short_code' => (string) ($result['short_code'] ?? ''),
|
||||
],
|
||||
]);
|
||||
];
|
||||
|
||||
$programme = $result['programme_snapshot'] ?? null;
|
||||
if (is_array($programme) && ! empty($programme['days'])) {
|
||||
$updates['settings'] = array_merge($room->settings ?? [], [
|
||||
'programme_snapshot' => $programme,
|
||||
'linked_programme_items' => (array) ($result['linked_programme_items'] ?? []),
|
||||
]);
|
||||
}
|
||||
|
||||
$room->update($updates);
|
||||
|
||||
return $room->fresh();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user