Closed MBoretto closed 8 years ago
I had same problem with empty width in Video.php, all library failed over.
@DestroyKun Can you retrieve the raw update? Can be that the height is equal to 0?
I have not raw log, sorry.
BTW: Sometimes video thumb doesn't get send with the update and library fails as well in this case.
But Telegram tries to send it again and again, and that's delaying all other messages.
It shouldn't be checking if the data is valid whenever it comes from Telegram anyway.
@jacklul I would totally agree with you on that! But is the data coming from Telegram always "good"? You mentioned above that sometimes certain data is missing in the update. We need to manage it somehow, right? Otherwise there will possibly be inconsistencies and corrupt data.
For example for User object as long telegram provides valid id rest we could ignore.
first_name is empty has been fixed closing
This update:
{"update_id":632831207,"message":{"message_id":13069,"from":{"id":11487,"first_name":"Name","last_name":"it","username":"it"},"chat":{"id":-10000000000,"title":"chatname","type":"supergroup"},"date":1463284673,"left_chat_participant":{"id":195958188,"first_name":""},"left_chat_member":{"id":195958188,"first_name":""}}}
trown:This is due to the empty name in
left_chat_member
andleft_chat_participant
I was thinking to remove theis_empty
check and just leave theisset
one here:https://github.com/akalongman/php-telegram-bot/blob/master/src/Entities/User.php#L37
@jacklul @noplanman what do you think?