westacks / telebot-laravel

Laravel adapter for TeleBot
https://westacks.github.io/telebot/
MIT License
8 stars 1 forks source link

[BUG] Configuration of default in AuthorizeWebAppRequest is incorrect #1

Closed Tantuss closed 4 months ago

Tantuss commented 4 months ago

Describe the bug

In Laravel: If you want to make use of the AuthorizeWebAppRequest, then you need to set in the config telebot.bots.default But if you set this, then the php artisan telebot:webhook will fail, because it looks like you have 2 bots: default and bot

But in reality, of course, default is not a bot.

I believe the 'src/Middleware/AuthorizeWebAppRequest.php' requires a change to make use of: config('telebot.default')

punyflash commented 4 months ago

Yeah, that's correct. Thanks for pointing it out, it should be config('telebot.default') there: https://github.com/westacks/telebot-laravel/blob/65e6caae4084b89634b7b7230ffa9e743a104613/src/Middleware/AuthorizeWebAppRequest.php#L18-L21

I'll gladly accept PR if you want your contribution to be recorded

punyflash commented 4 months ago

Fixed in 4a5f559dc6a4d0db230a257aa60cd6b885b669c0