Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
image: mysql:8.3.0
restart: unless-stopped
ports:
- "3308:3306"
- "3306:3306"
environment:
MYSQL_DATABASE: test_db
MYSQL_ROOT_PASSWORD: password
Expand Down Expand Up @@ -73,7 +73,7 @@ services:
restart: unless-stopped
ports:
- "1025:1025"
- "1080:8025"
- "1080:1080"
networks:
- bowphp_network
healthcheck:
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Client/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ public function isSuccessful(): bool
/**
* Get the response executing time
*
* @return ?int
* @return mixed
*/
public function getExecutionTime(): ?int
public function getExecutionTime(): mixed
{
return $this->headers['total_time'] ?? null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mail/MailQueueTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ public function process(): void
*/
public function onException(Throwable $e): void
{
$this->deleteJob();
$this->deleteTask();
}
}
10 changes: 5 additions & 5 deletions src/Notifier/Adapters/TelegramChannelAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TelegramChannelAdapter implements ChannelAdapterInterface
/**
* @var string
*/
private string $botToken;
private ?string $botToken;

/**
* Constructor
Expand All @@ -25,10 +25,6 @@ class TelegramChannelAdapter implements ChannelAdapterInterface
public function __construct()
{
$this->botToken = config('messaging.telegram.bot_token');

if (!$this->botToken) {
throw new InvalidArgumentException('The Telegram bot token is required');
}
}

/**
Expand All @@ -51,6 +47,10 @@ public function send(Model $context, Notifier $notifier): void
throw new InvalidArgumentException('The chat ID and message are required for Telegram');
}

if (!$this->botToken) {
throw new InvalidArgumentException('The Telegram bot token is required');
}

$client = new HttpClient();
$endpoint = "https://api.telegram.org/bot{$this->botToken}/sendMessage";

Expand Down
2 changes: 1 addition & 1 deletion src/Notifier/NotifierQueueTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public function process(): void
*/
public function onException(Throwable $e): void
{
$this->deleteJob();
$this->deleteTask();
}
}
2 changes: 1 addition & 1 deletion src/Notifier/NotifierShouldQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

interface NotifierShouldQueue
{
}
}
Loading
Loading