Add guest policy settings
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-01 20:25:39 +01:00
parent 25d464215e
commit c180b37760
15 changed files with 500 additions and 19 deletions

View File

@@ -9,6 +9,7 @@ use App\Http\Requests\Tenant\BroadcastGuestNotificationRequest;
use App\Http\Resources\Tenant\GuestNotificationResource;
use App\Models\Event;
use App\Models\GuestNotification;
use App\Models\GuestPolicySetting;
use App\Services\GuestNotificationService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -55,6 +56,11 @@ class EventGuestNotificationController extends Controller
$expiresAt = null;
if (! empty($data['expires_in_minutes'])) {
$expiresAt = now()->addMinutes((int) $data['expires_in_minutes']);
} else {
$policyTtl = GuestPolicySetting::current()->guest_notification_ttl_hours;
if ($policyTtl !== null && $policyTtl > 0) {
$expiresAt = now()->addHours((int) $policyTtl);
}
}
$payload = null;