vgram icon indicating copy to clipboard operation
vgram copied to clipboard

IDs should be i64s, not ints.

Open km19809 opened this issue 2 years ago • 0 comments

According to doc, IDs and file sizes are at most 52 bits.

This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.

So they should be i64, not an int(32 bits integer).

The full list:

  1. User.id
  2. Chat.id
  3. Message.migrate_to_chat_id
  4. Message.migrate_from_chat_id
  5. Animation.file_size
  6. Audio.file_size
  7. Document.file_size
  8. Video.file_size
  9. Voice.file_size
  10. Contact.user_id
  11. UserShared.user_id
  12. ChatShared.user_id
  13. File.file_size
  14. ChatJoinRequest.user_chat_id
  15. ResponseParameters.migrate_to_chat_id

Should I make a PR for this?

km19809 avatar Mar 22 '23 10:03 km19809