Title: pyrogram: update MIN_CHANNEL_ID and MIN_CHAT_ID by rebeeh · Pull Request #1430 · pyrogram/pyrogram · GitHub
Open Graph Title: pyrogram: update MIN_CHANNEL_ID and MIN_CHAT_ID by rebeeh · Pull Request #1430 · pyrogram/pyrogram
X Title: pyrogram: update MIN_CHANNEL_ID and MIN_CHAT_ID by rebeeh · Pull Request #1430 · pyrogram/pyrogram
Description: Contribution Request: Update MIN_CHANNEL_ID and MIN_CHAT_ID in Pyrogram Title: Update MIN_CHANNEL_ID and MIN_CHAT_ID to Fix "Peer id invalid" Error Description This contribution request proposes an update to the MIN_CHANNEL_ID and MIN_CHAT_ID values in Pyrogram. The current values are causing a "Peer id invalid" error in some scenarios. This update changes the MIN_CHANNEL_ID to -1007852516352 and the MIN_CHAT_ID to -999999999999 to address this issue. Changes Old Value: MIN_CHANNEL_ID = -1002147483647 New Value: MIN_CHANNEL_ID = -1007852516352 Old Value: MIN_CHAT_ID = -2147483647 New Value: MIN_CHAT_ID = -999999999999 Reason for Change The existing MIN_CHANNEL_ID and MIN_CHAT_ID values are no longer valid in certain cases, leading to the "Peer id invalid" error. By updating the values, we aim to resolve this error and ensure that Pyrogram can handle channel and chat IDs correctly. Code Update The change will be made in the relevant Pyrogram file where MIN_CHANNEL_ID and MIN_CHAT_ID are defined. # Current values MIN_CHANNEL_ID = -1002147483647 MIN_CHAT_ID = -2147483647 # Updated values MIN_CHANNEL_ID = -1007852516352 MIN_CHAT_ID = -999999999999 Testing To verify this change, tests will be conducted to ensure that channel and chat IDs are processed correctly without causing the "Peer id invalid" error. Specific test cases will include: Creating a channel with an ID greater than -1007852516352 and verifying successful handling. Creating a chat with an ID greater than -999999999999 and verifying successful handling. Handling channel and chat IDs close to the boundary values to ensure no off-by-one errors or similar issues. General regression testing to ensure no other functionality is impacted. Impact This update is expected to fix the "Peer id invalid" error without introducing any breaking changes. All existing functionalities should remain intact, with improved reliability in handling channel and chat IDs. Acknowledgements Special thanks to the users and developers who identified and reported the "Peer id invalid" error and contributed to the discussion around the solution. Additional Notes Please review and merge this contribution to improve the robustness of Pyrogram in handling Telegram channel and chat IDs. If there are any questions or further suggestions, I am available to discuss them. Thank you for your time and consideration. Submitted by: ebiza
Open Graph Description: Contribution Request: Update MIN_CHANNEL_ID and MIN_CHAT_ID in Pyrogram Title: Update MIN_CHANNEL_ID and MIN_CHAT_ID to Fix "Peer id invalid" Error Description This contribution request p...
X Description: Contribution Request: Update MIN_CHANNEL_ID and MIN_CHAT_ID in Pyrogram Title: Update MIN_CHANNEL_ID and MIN_CHAT_ID to Fix "Peer id invalid" Error Description This contribution r...
Opengraph URL: https://github.com/pyrogram/pyrogram/pull/1430
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b5b3428b-2fff-6cd1-97cc-57b2c861ed58 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CC9A:FF0D0:3DF4F5F:54C57E4:6973EE6F |
| html-safe-nonce | aa3ddd0106eb77068ebee8b60ff9748baed94eea27a2366afcf8e221f22ae5e9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzlBOkZGMEQwOjNERjRGNUY6NTRDNTdFNDo2OTczRUU2RiIsInZpc2l0b3JfaWQiOiI2Mjk3OTg4MzYyMzAxNTU4ODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1fedfa5e1ea1c8137aa8bba2931645260dc606467b25036b118eb6fc993a4872 |
| hovercard-subject-tag | pull_request:1910606539 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/pyrogram/pyrogram/pull/1430/files |
| twitter:image | https://avatars.githubusercontent.com/u/135997849?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/135997849?s=400&v=4 |
| og:image:alt | Contribution Request: Update MIN_CHANNEL_ID and MIN_CHAT_ID in Pyrogram Title: Update MIN_CHANNEL_ID and MIN_CHAT_ID to Fix "Peer id invalid" Error Description This contribution request p... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 99794f659b61e238a7ec37595eeb36b54a0ba1f2ae246f51ccb8ac5e4f08812e |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/pyrogram/pyrogram git https://github.com/pyrogram/pyrogram.git |
| octolytics-dimension-user_id | 34474300 |
| octolytics-dimension-user_login | pyrogram |
| octolytics-dimension-repository_id | 113971228 |
| octolytics-dimension-repository_nwo | pyrogram/pyrogram |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 113971228 |
| octolytics-dimension-repository_network_root_nwo | pyrogram/pyrogram |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8b15a65f03216f079a4ae509ff400d3e2ce03b58 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width