Skip to content

Merge pull request #1 from sameer-tech-solution/sameer-tech-solution-… - #3

Open
sameer-tech-solution wants to merge 3 commits into
sameer-tech-solution-patch-1from
fix-heroku-bot
Open

sameer-tech-solution wants to merge 3 commits into
sameer-tech-solution-patch-1from
fix-heroku-bot

Conversation

@sameer-tech-solution

Copy link
Copy Markdown
Owner

@coderabbitai I am opening this PR to fix the issue where the bot fails to download/forward files from Private Channels and Restricted Content channels on Heroku.

Current Status:
I have already generated a Pyrogram StringSession and securely added it to my Heroku Config Vars as STRING. I am a member of the private channel, but the bot is still failing.

What I need you to do:
Please analyze the repository (especially shared_client.py, plugins/batch.py, and plugins/settings.py) and provide the exact code changes to fix this:

User Client Initialization: Ensure the User Client reads the STRING from environment variables and uses in_memory=True (to survive Heroku's ephemeral storage).

Strict Private Channel Handling: Update get_uclient() and get_msg() in batch.py so that it strictly uses the User Client for private links (t.me/c/...). It must never fall back to the bot client for private channels.

Clear Error Exceptions: If the User Client is missing, invalid, or hits a FloodWait / RPCError, raise a clear RuntimeError so I can see it in Heroku logs, rather than failing silently.

Please provide the commit suggestions so I can directly merge them.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 882140b3-3502-4a69-911b-598cf811d994

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-heroku-bot

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant