👎1
👎1
❤1
👍1
Warning to everyone storing user identifiers
If your code is storing the
We recommend using
Telethon will accomodate to this change by reading and serializing the identifiers as
Python itself does not care about the integer size, the session files also handles large integers, and so does JSON or pickle, so no changes are needed here.
You only need to worry about this if your database stores it as a signed integer 32-bits wide. If you're not storing user IDs anywhere this does not concern you.
See https://t.me/BotNews/57 for the official statement and more information.
If your code is storing the
user_id
or sender_id
in a database, make sure to use the type "long" or "int64". The user IDs will soon become larger than 2³¹ - 1, so they will not fit in a signed int32
type.We recommend using
int64
and not uint32
to prepare for whatever may happen in the future.Telethon will accomodate to this change by reading and serializing the identifiers as
uint32
(thus gaining an extra bit of size). For more size, Telegram will need to change the schema, so this is the best it can do for now.Python itself does not care about the integer size, the session files also handles large integers, and so does JSON or pickle, so no changes are needed here.
You only need to worry about this if your database stores it as a signed integer 32-bits wide. If you're not storing user IDs anywhere this does not concern you.
See https://t.me/BotNews/57 for the official statement and more information.
Telegram
BotNews
Bot API 5.1
• Added updates about member status changes in chats: my_chat_member and chat_member
• Support for improved invite links
• Basic info about voice chats
• And more, read the full changelog here:
https://core.telegram.org/bots/api-changelog#march…
• Added updates about member status changes in chats: my_chat_member and chat_member
• Support for improved invite links
• Basic info about voice chats
• And more, read the full changelog here:
https://core.telegram.org/bots/api-changelog#march…
👍1
Telethon Updates pinned «Warning to everyone storing user identifiers If your code is storing the user_id or sender_id in a database, make sure to use the type "long" or "int64". The user IDs will soon become larger than 2³¹ - 1, so they will not fit in a signed int32 type. We recommend…»