Title: get_chat_history: add min_id & max_id parameters by rkjdid · Pull Request #1366 · pyrogram/pyrogram · GitHub
Open Graph Title: get_chat_history: add min_id & max_id parameters by rkjdid · Pull Request #1366 · pyrogram/pyrogram
X Title: get_chat_history: add min_id & max_id parameters by rkjdid · Pull Request #1366 · pyrogram/pyrogram
Description: I'm switching lib from telethon because poor perfs, good news is that I retreive messages instantly now, was not the case with telethon. But the way my code works I keep track of the last (most recent) message retreived from history - this is conveniently handled via min_id param to Telegram's API, which is not passed down to base request in pyrogram. (offset_id does the work in reverse, probably acting similar to max_id, not sure if there is a difference) So here is my small contribution. I've also added max_id along the way but reflecting on what I just said maybe it would add confusion. This does the job for me, could help others. Could also be included in get_messages and search_messages perhaps, for now I only use get_chat_history.
Open Graph Description: I'm switching lib from telethon because poor perfs, good news is that I retreive messages instantly now, was not the case with telethon. But the way my code works I keep track of the last (most...
X Description: I'm switching lib from telethon because poor perfs, good news is that I retreive messages instantly now, was not the case with telethon. But the way my code works I keep track of the last (...
Opengraph URL: https://github.com/pyrogram/pyrogram/pull/1366
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:208144b3-40dc-81b1-b772-fcffa66d45e0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8D40:1C7DFD:25DB484:30C58AF:69748D1E |
| html-safe-nonce | 04318ef2472314bcf65b2068b94505df258b0c95ef2c2b54174503148994c4a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDQwOjFDN0RGRDoyNURCNDg0OjMwQzU4QUY6Njk3NDhEMUUiLCJ2aXNpdG9yX2lkIjoiNjYwNDUyMzk3MTkzMDI2MjgxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8a161709e693968928baf7dac956a747aae663106e0b41720f09868bff688cdf |
| hovercard-subject-tag | pull_request:1609835387 |
| 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/1366/files |
| twitter:image | https://avatars.githubusercontent.com/u/1699009?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1699009?s=400&v=4 |
| og:image:alt | I'm switching lib from telethon because poor perfs, good news is that I retreive messages instantly now, was not the case with telethon. But the way my code works I keep track of the last (most... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width