botman / driver-telegram

BotMan Telegram Driver
MIT License
86 stars 75 forks source link

Error with contacts that don't have telegram account! #115

Closed Sajjad-Arjmand closed 8 months ago

Sajjad-Arjmand commented 8 months ago

Description:

I was testing botman using a very simple controller that only hears('{message}') and replies. it replies any kind of messages except the contacts that didn't have telegram account!

ErrorException: Undefined index: user_id in file vendor\botman\driver-telegram\src\TelegramContactDriver.php on line 54

Steps To Reproduce:

I think line 54 in TelegramContactDriver.php should be like the above lines for fixing this issue:

$this->event->get('contact')['user_id'], => $this->event->get('contact')['user_id'] ?? '',

do you agree with me?