diff --git a/app/Services/PollAlertService.php b/app/Services/PollAlertService.php index 78ef8bc..44185d1 100644 --- a/app/Services/PollAlertService.php +++ b/app/Services/PollAlertService.php @@ -16,10 +16,10 @@ public function recordFailure(Instance $instance, string $message): void $instance->refresh(); $ntfyUrl = config('services.ntfy.url'); - $ntfyThreshold = (int) config('services.ntfy.threshold'); + $ntfyThreshold = config('services.ntfy.threshold'); $ntfyTopic = config('services.ntfy.topic'); - if ($ntfyUrl === null || $ntfyThreshold === 0 || $ntfyTopic === null) { + if ($ntfyUrl === null || $ntfyThreshold === null || $ntfyThreshold === 0 || $ntfyTopic === null) { return; } diff --git a/config/services.php b/config/services.php index 93fd034..43eb064 100644 --- a/config/services.php +++ b/config/services.php @@ -17,7 +17,7 @@ 'ntfy' => [ 'url' => env('NTFY_URL') ?: null, 'topic' => env('NTFY_TOPIC') ?: null, - 'threshold' => env('NTFY_THRESHOLD'), + 'threshold' => env('NTFY_THRESHOLD') !== null ? (int) env('NTFY_THRESHOLD') : null, ], 'postmark' => [ diff --git a/packages/Lvl0/FediDiscover/src/Console/Commands/PollInstancesCommand.php b/packages/Lvl0/FediDiscover/src/Console/Commands/PollInstancesCommand.php index e92c496..031049e 100644 --- a/packages/Lvl0/FediDiscover/src/Console/Commands/PollInstancesCommand.php +++ b/packages/Lvl0/FediDiscover/src/Console/Commands/PollInstancesCommand.php @@ -52,7 +52,7 @@ public function handle(): int $errors->each(fn (array $errorArr) => PollFailed::dispatch( $errorArr['instance'], - $errorArr['error'] ?? '', + $errorArr['error'], now()->toImmutable(), )); diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 8e6f01a..97a6501 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -4,7 +4,7 @@ -