Skip to content

Commit

Permalink
Merge pull request #8 from tanhongit/develop
Browse files Browse the repository at this point in the history
change the bot name in configs
  • Loading branch information
tanhongit authored Oct 8, 2023
2 parents 7b25178 + 83e68dc commit 03db76b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/tg-notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'timezone' => $_ENV['TIMEZONE'] ?? 'Asia/Ho_Chi_Minh',
],

'telegram-bot' => [
'bot' => [
'token' => $_ENV['TELEGRAM_BOT_TOKEN'] ?? '',
'chat_id' => $_ENV['TELEGRAM_BOT_CHAT_ID'] ?? '',
'notify_chat_ids' => explode(
Expand Down
4 changes: 2 additions & 2 deletions src/Services/NotificationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function accessDenied(
string $viewTemplate = null,
): void {
$telegramService->telegram->sendMessage([
'chat_id' => config('telegram-bot.chat_id'),
'chat_id' => config('bot.chat_id'),
'text' => view(
$viewTemplate ?? config('view.globals.access_denied'),
['chatId' => $chatId]
Expand Down Expand Up @@ -91,7 +91,7 @@ public function sendNotify(string $chatId, string $message = null): bool
];

$url = 'https://api.telegram.org/bot'
. config('telegram-bot.token') . '/sendMessage'
. config('bot.token') . '/sendMessage'
. '?' . http_build_query($queryParams);

try {
Expand Down

0 comments on commit 03db76b

Please sign in to comment.