File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,9 @@ class TelegramSetWebhookCommand extends Command
1111{
1212 protected $ signature = 'telegram:set-webhook
1313 {hostname? : Hostname to set}
14- {--d|drop-pending-updates : Pass to drop all pending updates}
15- {--a|all-update-types : Passes all possible update types to allowed_updates} ' ;
14+ {--d|drop-pending-updates : Drop all pending updates}
15+ {--a|all-update-types : Explicitly allow all updates (including "chat_member")}
16+ {--allowed-updates= : Define allowed updates (comma-seperated)} ' ;
1617
1718 protected $ description = 'Use this method to specify a url and receive incoming updates via an outgoing webhook ' ;
1819
@@ -42,6 +43,8 @@ public function handle(Telegram $bot)
4243
4344 if ($ this ->option ('all-update-types ' )) {
4445 $ options ['allowed_updates ' ] = Update::getUpdateTypes ();
46+ } elseif ($ allowedUpdates = $ this ->option ('allowed-updates ' )) {
47+ $ options ['allowed_updates ' ] = str ($ allowedUpdates )->explode (', ' );
4548 }
4649
4750 $ response = $ bot ->setWebhook ($ url , $ options );
You can’t perform that action at this time.
0 commit comments