diff --git a/app/Filament/Pages/Settings/NotificationPage.php b/app/Filament/Pages/Settings/NotificationPage.php index a79d61165..d3a443260 100755 --- a/app/Filament/Pages/Settings/NotificationPage.php +++ b/app/Filament/Pages/Settings/NotificationPage.php @@ -138,6 +138,12 @@ public function form(Form $form): Form ]) ->hidden(fn (Forms\Get $get) => $get('telegram_enabled') !== true) ->schema([ + Forms\Components\Fieldset::make('Options') + ->schema([ + Forms\Components\Toggle::make('telegram_disable_notification') + ->label('Send the message silently to the user') + ->columnSpanFull(), + ]), Forms\Components\Fieldset::make('Triggers') ->schema([ Forms\Components\Toggle::make('telegram_on_speedtest_run') diff --git a/app/Settings/NotificationSettings.php b/app/Settings/NotificationSettings.php index f23dfdbf6..cb29b6ae5 100644 --- a/app/Settings/NotificationSettings.php +++ b/app/Settings/NotificationSettings.php @@ -22,6 +22,8 @@ class NotificationSettings extends Settings public bool $telegram_enabled; + public bool $telegram_disable_notification; + public bool $telegram_on_speedtest_run; public bool $telegram_on_threshold_failure; diff --git a/database/settings/2024_02_07_173217_add_telegram_disable_notification_to_notification_settings.php b/database/settings/2024_02_07_173217_add_telegram_disable_notification_to_notification_settings.php new file mode 100644 index 000000000..f06ff9ae8 --- /dev/null +++ b/database/settings/2024_02_07_173217_add_telegram_disable_notification_to_notification_settings.php @@ -0,0 +1,11 @@ +migrator->add('notification.telegram_disable_notification', false); + } +};