Skip to content

Commit 693dd8c

Browse files
authored
[Feature] Silently send notifications for Telegram (alexjustesen#1110)
1 parent e892f65 commit 693dd8c

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

app/Filament/Pages/Settings/NotificationPage.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ public function form(Form $form): Form
138138
])
139139
->hidden(fn (Forms\Get $get) => $get('telegram_enabled') !== true)
140140
->schema([
141+
Forms\Components\Fieldset::make('Options')
142+
->schema([
143+
Forms\Components\Toggle::make('telegram_disable_notification')
144+
->label('Send the message silently to the user')
145+
->columnSpanFull(),
146+
]),
141147
Forms\Components\Fieldset::make('Triggers')
142148
->schema([
143149
Forms\Components\Toggle::make('telegram_on_speedtest_run')

app/Settings/NotificationSettings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class NotificationSettings extends Settings
2222

2323
public bool $telegram_enabled;
2424

25+
public bool $telegram_disable_notification;
26+
2527
public bool $telegram_on_speedtest_run;
2628

2729
public bool $telegram_on_threshold_failure;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
use Spatie\LaravelSettings\Migrations\SettingsMigration;
4+
5+
return new class extends SettingsMigration
6+
{
7+
public function up(): void
8+
{
9+
$this->migrator->add('notification.telegram_disable_notification', false);
10+
}
11+
};

0 commit comments

Comments
 (0)