Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some telegram user attributes are optional #8

Closed
IdrisN opened this issue Nov 23, 2020 · 3 comments
Closed

Some telegram user attributes are optional #8

IdrisN opened this issue Nov 23, 2020 · 3 comments

Comments

@IdrisN
Copy link

IdrisN commented Nov 23, 2020

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.

@pschocke
Copy link
Owner

pschocke commented Nov 23, 2020

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!

@pschocke
Copy link
Owner

Released v1.2.1 to take care of this. Thanks for spotting it!

@IdrisN
Copy link
Author

IdrisN commented Nov 23, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants