fix: skip get_dialogs() in whitelist mode to prevent hanging#96
Merged
Conversation
When CHAT_IDS is set (whitelist mode), the backup now fetches only the specified chats via get_entity() instead of calling get_dialogs() which iterates through ALL account dialogs. For accounts with many chats this call can hang indefinitely.
|
🐳 Dev images published!
The dev/test instance will pick up these changes automatically (Portainer GitOps). To test locally: docker pull drumsergio/telegram-archive:dev
docker pull drumsergio/telegram-archive-viewer:dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #95 — backup hangs at "Fetching dialog list..." when
CHAT_IDSis set.CHAT_IDSis set (whitelist mode),backup_all()now callsget_entity()for each whitelisted chat directly instead ofget_dialogs()which fetches ALL account dialogsget_dialogs()can hang indefinitely or take very longCHAT_IDS)Test plan
TestWhitelistModeBackup(verifiesget_dialogsnot called, handles entity fetch failure)🤖 Generated with Claude Code