René's URL Explorer Experiment


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

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:208144b3-40dc-81b1-b772-fcffa66d45e0
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8D40:1C7DFD:25DB484:30C58AF:69748D1E
html-safe-nonce04318ef2472314bcf65b2068b94505df258b0c95ef2c2b54174503148994c4a7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDQwOjFDN0RGRDoyNURCNDg0OjMwQzU4QUY6Njk3NDhEMUUiLCJ2aXNpdG9yX2lkIjoiNjYwNDUyMzk3MTkzMDI2MjgxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8a161709e693968928baf7dac956a747aae663106e0b41720f09868bff688cdf
hovercard-subject-tagpull_request:1609835387
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/pyrogram/pyrogram/pull/1366/files
twitter:imagehttps://avatars.githubusercontent.com/u/1699009?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1699009?s=400&v=4
og:image:altI'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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/pyrogram/pyrogram git https://github.com/pyrogram/pyrogram.git
octolytics-dimension-user_id34474300
octolytics-dimension-user_loginpyrogram
octolytics-dimension-repository_id113971228
octolytics-dimension-repository_nwopyrogram/pyrogram
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id113971228
octolytics-dimension-repository_network_root_nwopyrogram/pyrogram
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release488b30e96dfd057fbbe44c6665ccbc030b729dde
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpyrogram%2Fpyrogram%2Fpull%2F1366%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpyrogram%2Fpyrogram%2Fpull%2F1366%2Ffiles
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=pyrogram%2Fpyrogram
Reloadhttps://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files
Reloadhttps://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files
Reloadhttps://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files
pyrogram https://patch-diff.githubusercontent.com/pyrogram
pyrogramhttps://patch-diff.githubusercontent.com/pyrogram/pyrogram
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpyrogram%2Fpyrogram
Fork 1.6k https://patch-diff.githubusercontent.com/login?return_to=%2Fpyrogram%2Fpyrogram
Star 4.6k https://patch-diff.githubusercontent.com/login?return_to=%2Fpyrogram%2Fpyrogram
Code https://patch-diff.githubusercontent.com/pyrogram/pyrogram
Pull requests 61 https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pulls
Actions https://patch-diff.githubusercontent.com/pyrogram/pyrogram/actions
Security 0 https://patch-diff.githubusercontent.com/pyrogram/pyrogram/security
Insights https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pulse
Code https://patch-diff.githubusercontent.com/pyrogram/pyrogram
Pull requests https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pulls
Actions https://patch-diff.githubusercontent.com/pyrogram/pyrogram/actions
Security https://patch-diff.githubusercontent.com/pyrogram/pyrogram/security
Insights https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pulse
rkjdidhttps://patch-diff.githubusercontent.com/rkjdid
pyrogram:masterhttps://patch-diff.githubusercontent.com/pyrogram/pyrogram/tree/master
rkjdid:masterhttps://patch-diff.githubusercontent.com/rkjdid/pyrogram/tree/master
Conversation 0 https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366
Commits 1 https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/commits
Checks 0 https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/checks
Files changed https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files
Please reload this pagehttps://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files
get_chat_history: add min_id & max_id parameters https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files#top
Show all changes 1 commit https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files
773fda8 get_chat_history: add min_id & max_id params rkjdid Nov 20, 2023 https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/commits/773fda8fc3a96517f20714caf97d29a80355fe99
Clear filters https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files
Please reload this pagehttps://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files
Please reload this pagehttps://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files
pyrogram/methods/messages/get_chat_history.pyhttps://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files#diff-dba6539605b24fe90402419994fa9598fe324d91ec50cf6add229c01c68d4687
View file https://patch-diff.githubusercontent.com/pyrogram/pyrogram/blob/773fda8fc3a96517f20714caf97d29a80355fe99/pyrogram/methods/messages/get_chat_history.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files#diff-dba6539605b24fe90402419994fa9598fe324d91ec50cf6add229c01c68d4687
https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files#diff-dba6539605b24fe90402419994fa9598fe324d91ec50cf6add229c01c68d4687
https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files#diff-dba6539605b24fe90402419994fa9598fe324d91ec50cf6add229c01c68d4687
https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files#diff-dba6539605b24fe90402419994fa9598fe324d91ec50cf6add229c01c68d4687
https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files#diff-dba6539605b24fe90402419994fa9598fe324d91ec50cf6add229c01c68d4687
https://patch-diff.githubusercontent.com/pyrogram/pyrogram/pull/1366/files#diff-dba6539605b24fe90402419994fa9598fe324d91ec50cf6add229c01c68d4687
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.