bd sync: 2026-01-12 17:10:05
This commit is contained in:
@@ -126,36 +126,6 @@ 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 = [
|
||||
@@ -172,9 +142,6 @@ class GuestNotificationService
|
||||
|
||||
$clean = array_filter([
|
||||
'cta' => $cta,
|
||||
'photo_id' => $photoId,
|
||||
'photo_ids' => $photoIds,
|
||||
'count' => $count,
|
||||
]);
|
||||
|
||||
return $clean === [] ? null : $clean;
|
||||
|
||||
Reference in New Issue
Block a user