Skip to content

Commit

Permalink
Merge pull request #10 from tanhongit/main
Browse files Browse the repository at this point in the history
Small change
  • Loading branch information
tanhongit authored Oct 9, 2023
2 parents 48f5131 + b1d3c85 commit e356833
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/tg-notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
?? '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']
'set_menu_cmd' => $_ENV['TGN_VIEW_TOOL_SET_MENU_COMMAND']
?? 'tools.set_menu_cmd',
],
],
Expand Down
4 changes: 2 additions & 2 deletions src/Services/AppService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public function __construct(Telegram $telegram = null)
$this->telegram = $telegram ?? new Telegram(config('telegram-git-notifier.bot.token'));
}

public function setCurrentChatId(string $chatId): void
public function setCurrentChatId(string $chatId = null): void
{
$this->chatId = $chatId;
$this->chatId = $chatId ?? config('telegram-git-notifier.bot.chat_id');
}

private function createBaseContent(): array
Expand Down
6 changes: 4 additions & 2 deletions src/Services/SettingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ public function sendSettingEventMessage(
) {
$this->editMessageText(
view(
$view ?? config('telegram-git-notifier.view.tools.custom_event'),
$view ??
config('telegram-git-notifier.view.tools.custom_event'),
compact('platform')
),
['reply_markup' => $this->eventMarkup(null, $platform)]
Expand Down Expand Up @@ -259,7 +260,8 @@ public function settingMarkup(): array
$markup = [
[
$this->telegram->buildInlineKeyBoardButton(
$this->setting[SettingConstant::T_IS_NOTIFIED] ? '✅ Allow notifications'
$this->setting[SettingConstant::T_IS_NOTIFIED]
? '✅ Allow notifications'
: 'Allow notifications',
'',
SettingConstant::SETTING_IS_NOTIFIED
Expand Down

0 comments on commit e356833

Please sign in to comment.