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

Is using Integer type for User id safe? #230

Closed
EXL opened this issue Mar 10, 2021 · 2 comments
Closed

Is using Integer type for User id safe? #230

EXL opened this issue Mar 10, 2021 · 2 comments

Comments

@EXL
Copy link

EXL commented Mar 10, 2021

https://core.telegram.org/bots/api-changelog#march-9-2021

⚠️WARNING! ⚠️
After one of the upcoming Bot API updates, some user identifiers will become bigger than 2^31 - 1 and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.

@mircoianese
Copy link
Collaborator

I would say that this needs to be addressed soon. There are also some methods taking Integer as user ID (for example GetChatMember)

@pengrad
Copy link
Owner

pengrad commented Jul 7, 2021

thanks to @mircoianese updated in 5.2.0

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

3 participants