[Feature] Silently send notifications for Telegram (#1110)

This commit is contained in:
Alex Justesen
2024-02-07 12:41:33 -05:00
committed by GitHub
parent e892f65a28
commit 693dd8c8df
3 changed files with 19 additions and 0 deletions
@@ -138,6 +138,12 @@ class NotificationPage extends SettingsPage
])
->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')
+2
View File
@@ -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;
@@ -0,0 +1,11 @@
<?php
use Spatie\LaravelSettings\Migrations\SettingsMigration;
return new class extends SettingsMigration
{
public function up(): void
{
$this->migrator->add('notification.telegram_disable_notification', false);
}
};