Closed vdomah closed 4 years ago
same problem here...the bot keep stop when don't have vcard
Same problem too.
curl 'http://chatbot.loc:8080/botman' POST -d '{"update_id":513976669, "message":{"message_id":200,"from":{"id":1218871752,"is_bot":false,"first_name":"Eduard","last_name":"Malik","username":"eduard_malik","language_code":"ru"},"chat":{"id":1218871752,"first_name":"Eduard","last_name":"Malik","username":"eduard_malik","type":"private"},"date":1600069362,"contact":{"phone_number":"79789999999","first_name":"Eduard","last_name":"Malik","user_id":1218871752}}}'
ErrorException: Undefined index: vcard in file /home/hotadd/www/chatbot/vendor/botman/driver-telegram/src/TelegramContactDriver.php on line 55 Stack trace:
Fixed via botman/driver-telegram#88 and will be released as 1.6.2
later today.
Required Information
Expected behaviour
Receiving contact array after user sends his contact details.
Actual behaviour
TelegramContactDriver is not checking iv vcard field is present. That causes error:
Steps to reproduce
Using this code example: https://gist.github.com/yarkm13/4d9359f2c96149a012f563ea41849c02
Extra details
Solved it by extending TelegramContactDriver and overriding loadMessages method:
then in routes/botman.php: