Skip to content

Commit 9635712

Browse files
authored
Release v0.15.1 (alexjustesen#1112)
1 parent 693dd8c commit 9635712

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

app/Notifications/Telegram/TestNotification.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Notifications\Telegram;
44

5+
use App\Settings\NotificationSettings;
56
use Illuminate\Bus\Queueable;
67
use Illuminate\Contracts\Queue\ShouldQueue;
78
use Illuminate\Notifications\Notification;
@@ -11,6 +12,18 @@ class TestNotification extends Notification implements ShouldQueue
1112
{
1213
use Queueable;
1314

15+
protected $settings;
16+
17+
/**
18+
* Create a new notification instance.
19+
*
20+
* @return void
21+
*/
22+
public function __construct($message)
23+
{
24+
$this->settings = new NotificationSettings();
25+
}
26+
1427
/**
1528
* Get the notification's delivery channels.
1629
*
@@ -30,6 +43,7 @@ public function toTelegram(object $notifiable): TelegramMessage
3043
{
3144
return TelegramMessage::create()
3245
->to($notifiable->routes['telegram_chat_id'])
46+
->disableNotification($this->settings->telegram_disable_notification)
3347
->content('👋 Testing the Telegram notification channel.');
3448
}
3549
}

app/Telegram/TelegramNotification.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Telegram;
44

5+
use App\Settings\NotificationSettings;
56
use Illuminate\Bus\Queueable;
67
use Illuminate\Notifications\Notification;
78
use NotificationChannels\Telegram\TelegramMessage;
@@ -12,6 +13,8 @@ class TelegramNotification extends Notification
1213

1314
protected $message;
1415

16+
protected $settings;
17+
1518
/**
1619
* Create a new notification instance.
1720
*
@@ -20,6 +23,8 @@ class TelegramNotification extends Notification
2023
public function __construct($message)
2124
{
2225
$this->message = $message;
26+
27+
$this->settings = new NotificationSettings();
2328
}
2429

2530
/**
@@ -41,6 +46,7 @@ public function toTelegram($notifiable): TelegramMessage
4146
{
4247
return TelegramMessage::create()
4348
->to($notifiable->routes['telegram_chat_id'])
49+
->disableNotification($this->settings->telegram_disable_notification)
4450
->content($this->message);
4551
}
4652
}

config/speedtest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
/**
77
* Build information
88
*/
9-
'build_date' => Carbon::parse('2024-02-06'),
9+
'build_date' => Carbon::parse('2024-02-07'),
1010

11-
'build_version' => 'v0.15.0',
11+
'build_version' => 'v0.15.1',
1212

1313
/**
1414
* General

0 commit comments

Comments
 (0)