Skip to content

Commit d90268e

Browse files
authored
Merge pull request #50 from shzaur/main
compatibility with illuminate/support < 9.0
2 parents b8628d5 + f6997f4 commit d90268e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Console/Commands/TelegramFetchCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
use Illuminate\Console\Command;
8+
use Illuminate\Support\Str;
89
use Longman\TelegramBot\Entities\Update;
910
use Longman\TelegramBot\Exception\TelegramException;
1011
use Longman\TelegramBot\Telegram;
@@ -35,7 +36,7 @@ public function handle(Telegram $bot)
3536
if ($this->option('all-update-types')) {
3637
$options['allowed_updates'] = Update::getUpdateTypes();
3738
} elseif ($allowedUpdates = $this->option('allowed-updates')) {
38-
$options['allowed_updates'] = str($allowedUpdates)->explode(',');
39+
$options['allowed_updates'] = Str::of($allowedUpdates)->explode(',');
3940
}
4041

4142
$this->info("Start fetching updates...\n<comment>(Exit with Ctrl + C.)</comment>");

src/Console/Commands/TelegramSetWebhookCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function handle(Telegram $bot)
4444
if ($this->option('all-update-types')) {
4545
$options['allowed_updates'] = Update::getUpdateTypes();
4646
} elseif ($allowedUpdates = $this->option('allowed-updates')) {
47-
$options['allowed_updates'] = str($allowedUpdates)->explode(',');
47+
$options['allowed_updates'] = Str::of($allowedUpdates)->explode(',');
4848
}
4949

5050
$response = $bot->setWebhook($url, $options);

0 commit comments

Comments
 (0)