Add join token TTL policy and Live Show link sharing
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-05 21:11:36 +01:00
parent 3f3061a899
commit 88012c35bd
18 changed files with 636 additions and 9 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Services;
use App\Models\Event;
use App\Models\EventJoinToken;
use App\Models\GuestPolicySetting;
use Illuminate\Support\Arr;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
@@ -28,6 +29,12 @@ class EventJoinTokenService
$payload['expires_at'] = $expiresAt instanceof Carbon
? $expiresAt
: Carbon::parse($expiresAt);
} else {
$ttlHours = (int) (GuestPolicySetting::current()->join_token_ttl_hours ?? 0);
if ($ttlHours > 0) {
$payload['expires_at'] = now()->addHours($ttlHours);
}
}
if ($createdBy = Arr::get($attributes, 'created_by')) {