Some telegram user attributes are optional
Closed this issue ยท 3 comments
The method checkAndGetResponseData(...)
checks if all of the following attributes are available: ['id', 'first_name', 'last_name', 'username', 'photo_url', 'auth_date', 'hash']
.
last_name
is an optional attribute though. This leads to a NotAllAttributesException
although the received data is potentially valid.
I haven't tested it jet, but i assume that photo_url
is also not set if the user does not have a profile picture.
Hey, thanks for catching this!
Seems like Telegram didn't state this at all...
After thinking about this, I don't think this check is necessary at all - I'll make a pr that removes this check completely.
Thanks!
Released v1.2.1 to take care of this. Thanks for spotting it!
Awesome!
That was a fast response. I've already started fixing the check and was just about to open a pr but was a couple minutes last i guess :D