Closed jacklul closed 8 years ago
@jacklul I agree with you that we shouldn't really be checking the data itself since it's coming from Telegram like that. As an interim solution, I think we do as you suggest, to modify the checks so that errors like that don't pop up 👍
P.S. The entities need to be rewritten at some point anyway, using magic methods to get rid of all the redundant method names.
Referring to #193 and closing here.
I seem to be getting
a lot (I assume people have name = '0'), also similar error with 'duration' in Voice entity (half a second recording is still duration = 0 I guess), maybe we shouldn't check for such fields in incoming updates?
Possibly replace
empty($this->first_name)
with$this->first_name === ''
and allow 0 value in duration? Same changes could be applied to other entities.