diff --git a/config/telegram-git-notifier.php b/config/telegram-git-notifier.php index ee50fc8..6df0765 100644 --- a/config/telegram-git-notifier.php +++ b/config/telegram-git-notifier.php @@ -2,12 +2,12 @@ return [ 'app' => [ - 'name' => env('APP_NAME', 'Laravel Telegram Git Notify'), + 'name' => env('APP_NAME', 'Laravel Telegram Git Notify'), 'url' => env('APP_URL', 'http://localhost:8000'), '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( @@ -17,17 +17,40 @@ ], 'author' => [ - 'contact' => env('TGN_AUTHOR_CONTACT', 'https://t.me/tannp27'), - 'source_code' => env('TGN_AUTHOR_SOURCE_CODE', 'https://github.com/lbiltech/telegram-git-notifier'), + 'discussion' => env('TGN_AUTHOR_CONTACT', 'https://t.me/tannp27'), + 'source_code' => env( + 'TGN_AUTHOR_SOURCE_CODE', + 'https://github.com/lbiltech/laravel-telegram-git-notifier' + ), ], 'view' => [ - 'path' => env('TGN_VIEW_PATH', 'resources/views/telegram-git-notifier'), - 'event' => [ + 'event' => [ 'default' => env('TGN_VIEW_EVENT_DEFAULT', 'default'), ], 'globals' => [ - 'access_denied' => env('TGN_VIEW_GLOBALS_ACCESS_DENIED', 'globals.access_denied'), + 'access_denied' => env( + 'TGN_VIEW_GLOBALS_ACCESS_DENIED', + 'globals.access_denied' + ), + ], + 'tools' => [ + 'settings' => env( + 'TGN_VIEW_TOOL_SETTING', + 'tools.settings' + ), + 'custom_event_action' => env( + 'TGN_VIEW_TOOL_CUSTOM_EVENT_ACTION', + 'tools.custom_event_action' + ), + 'custom_event' => env( + 'TGN_VIEW_TOOL_CUSTOM_EVENT', + 'tools.custom_event' + ), + 'set_menu_cmd' => env( + 'TGN_VIEW_TOOL_SET_MENU_COMMAND', + 'tools.set_menu_cmd' + ), ], ], ]; diff --git a/src/Http/Actions/WebhookAction.php b/src/Http/Actions/WebhookAction.php index 1399f4d..3b54537 100644 --- a/src/Http/Actions/WebhookAction.php +++ b/src/Http/Actions/WebhookAction.php @@ -13,7 +13,7 @@ class WebhookAction public function __construct(WebhookService $webhookService) { $this->webhookService = $webhookService; - $this->webhookService->setToken(config('telegram-git-notifier.telegram-bot.token')); + $this->webhookService->setToken(config('telegram-git-notifier.bot.token')); $this->webhookService->setUrl(config('telegram-git-notifier.app.url')); }