Restore photobooth uploader files after sync

This commit is contained in:
Codex Agent
2026-01-12 17:23:34 +01:00
parent dc5c80cda4
commit 1970c259ed
56 changed files with 3015 additions and 190 deletions

View File

@@ -126,6 +126,36 @@ class GuestNotificationService
return null;
}
$photoId = Arr::get($payload, 'photo_id');
if (is_numeric($photoId)) {
$photoId = max(1, (int) $photoId);
} else {
$photoId = null;
}
$photoIds = Arr::get($payload, 'photo_ids');
if (is_array($photoIds)) {
$photoIds = array_values(array_unique(array_filter(array_map(function ($value) {
if (! is_numeric($value)) {
return null;
}
$int = (int) $value;
return $int > 0 ? $int : null;
}, $photoIds))));
$photoIds = array_slice($photoIds, 0, 10);
} else {
$photoIds = [];
}
$count = Arr::get($payload, 'count');
if (is_numeric($count)) {
$count = max(1, min(9999, (int) $count));
} else {
$count = null;
}
$cta = Arr::get($payload, 'cta');
if (is_array($cta)) {
$cta = [
@@ -142,6 +172,9 @@ class GuestNotificationService
$clean = array_filter([
'cta' => $cta,
'photo_id' => $photoId,
'photo_ids' => $photoIds,
'count' => $count,
]);
return $clean === [] ? null : $clean;