Add control room automations and uploader overrides
This commit is contained in:
@@ -30,6 +30,7 @@ class ProcessPhotoSecurityScan implements ShouldQueue
|
||||
|
||||
if (! $photo) {
|
||||
Log::warning('[PhotoSecurity] Skipping missing photo', ['photo_id' => $this->photoId]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -66,6 +67,7 @@ class ProcessPhotoSecurityScan implements ShouldQueue
|
||||
}
|
||||
|
||||
$existingMeta = $photo->security_meta ?? [];
|
||||
$requiresManualReview = is_array($existingMeta) && ($existingMeta['manual_review'] ?? false);
|
||||
|
||||
$update = [
|
||||
'security_scan_status' => $status,
|
||||
@@ -74,7 +76,7 @@ class ProcessPhotoSecurityScan implements ShouldQueue
|
||||
'security_meta' => array_merge(is_array($existingMeta) ? $existingMeta : [], $metadata),
|
||||
];
|
||||
|
||||
if (in_array($status, ['clean', 'skipped'], true) && $photo->status === 'pending') {
|
||||
if (in_array($status, ['clean', 'skipped'], true) && $photo->status === 'pending' && ! $requiresManualReview) {
|
||||
$update['status'] = 'approved';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user