diff --git a/app/Filament/Pages/Settings/Notification.php b/app/Filament/Pages/Settings/Notification.php index 7e1c1a58a..27d26bc39 100755 --- a/app/Filament/Pages/Settings/Notification.php +++ b/app/Filament/Pages/Settings/Notification.php @@ -257,6 +257,7 @@ public function form(Schema $schema): Schema ]), Repeater::make('apprise_channel_urls') ->label(__('settings/notifications.apprise_channels')) + ->helperText(__('settings/notifications.apprise_save_to_test')) ->schema([ TextInput::make('channel_url') ->label(__('settings/notifications.apprise_channel_url')) @@ -274,7 +275,11 @@ public function form(Schema $schema): Schema ->action(fn (Get $get) => SendAppriseTestNotification::run( channel_urls: $get('apprise_channel_urls'), )) - ->hidden(fn (Get $get) => ! count($get('apprise_channel_urls'))), + ->hidden(function () { + $settings = app(NotificationSettings::class); + + return empty($settings->apprise_server_url) || ! count($settings->apprise_channel_urls ?? []); + }), ]), ]), ]), diff --git a/app/Jobs/Ookla/SkipSpeedtestJob.php b/app/Jobs/Ookla/SkipSpeedtestJob.php index 948fe792d..773d4a793 100644 --- a/app/Jobs/Ookla/SkipSpeedtestJob.php +++ b/app/Jobs/Ookla/SkipSpeedtestJob.php @@ -40,9 +40,9 @@ public function middleware(): array public function handle(): void { /** - * Only skip IPs for scheduled tests. + * Skip if test is not scheduled or no IPs are configured to skip. */ - if ($this->result->scheduled === false) { + if ($this->result->scheduled === false || empty(config('speedtest.preflight.skip_ips'))) { return; } diff --git a/lang/en/settings/notifications.php b/lang/en/settings/notifications.php index 788f31d91..87c82e7da 100644 --- a/lang/en/settings/notifications.php +++ b/lang/en/settings/notifications.php @@ -25,6 +25,7 @@ 'apprise_channel_url' => 'Service URL', 'apprise_hint_description' => 'Apprise allows you to send notifications to 90+ services. You need to run an Apprise server and configure service URLs below.', 'apprise_channel_url_helper' => 'Use Apprise URL format. Examples: discord://WebhookID/Token, slack://TokenA/TokenB/TokenC', + 'apprise_save_to_test' => 'Save your settings to test the notification.', 'test_apprise_channel' => 'Test Apprise', 'apprise_channel_url_validation_error' => 'Invalid Apprise URL. Must use Apprise format (e.g., discord://, slack://), not http:// or https://. See the Apprise documentation for more information',