mirror of
https://github.com/alexjustesen/speedtest-tracker.git
synced 2026-06-23 07:20:09 +00:00
[Feature] Silently send notifications for Telegram (#1110)
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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;
|
||||
|
||||
+11
@@ -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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user