- Add guest_message router and handler for guest mentions in chats where bot is not a member
- Support link detection from direct messages, replies, quotes, and text_link entities
- Integrate with inline media senders for supported platforms and deep-linking for audio/albums
- Add guest rate-limiting and ban enforcement in antiflood and ban middlewares
- Update chat tracker to track guest users without saving non-member group data
- Bypass private chat guard for guest messages
- Add /start settings, /start stats, and /start dl_<token> deep-link handlers
- Add comprehensive test suite in tests/test_guest_mode.py
- Add video_quality, as_document, audio_format, and file_button to user settings schema and Alembic migrations.
- Categorize /settings into Media & Quality, Appearance & Buttons, and Chat & Clean-up with dynamic back navigation.
- Implement strict document delivery with disable_content_type_detection=True to prevent Telegram video player fallback when as_document is ON.
- Add multi-photo ZIP archive packaging for photo carousels in as_document mode.
- Differentiate DB media file cache entries between video and document types (url#document vs url#video) to eliminate cache collisions.
- Hide redundant Download File inline button when as_document setting is active.
- Remove obsolete referral system (/ref command and links).
- Introduced caching for statistics snapshots and charts to improve performance.
- Refactored the statistics fetching logic to aggregate data by service and date.
- Updated the chart rendering function to return PNG bytes directly without filesystem writes.
- Added new inline keyboard for statistics with options to toggle between total and split views.
- Improved test coverage for statistics-related functionalities, including fetching and rendering.
What changed:
- unified inline media delivery across TikTok, Instagram, Pinterest, SoundCloud, YouTube, and Twitter around a single editable-message flow with chosen-inline auto start and callback fallback
- added reusable inline request state/services, service icons, album deep links, and single-message inline progress/edit helpers
- enabled inline support for regular YouTube videos, Twitter inline media, and Twitter multi-photo album deep links; aligned Pinterest/Instagram/TikTok inline behaviors
- cleaned dead duplicated inline code, extracted shared inline request guards, and expanded tests around TikTok, Pinterest, SoundCloud, and YouTube handlers
- optimized project setup with trimmed runtime requirements, requirements-dev split, .dockerignore, Docker/compose improvements, and README updates
- rebuilt logging with structured context-aware adapters, request scoped flow decorators, JSONL event/perf logs, queue/download/cobalt timing events, and safer extra field sanitization to avoid LogRecord key collisions
- Added try-except block in the stats command to handle exceptions and log errors.
- Updated logging to capture exceptions when generating stats.
Refactor YouTube download handler for improved error handling and type safety
- Introduced safe_int function to handle integer conversions safely.
- Updated download_video and inline_youtube_query functions to use safe_int for view and like counts.
- Removed custom OAuth verifier function and related code.
Simplify video info keyboard function
- Removed unused full_quality_callback parameter from return_video_info_keyboard function.
Update requirements for PostgreSQL support
- Added psycopg2-binary and asyncpg to requirements.txt for PostgreSQL database support.
- Added pytest-asyncio for async testing.
Update Alembic configuration for environment-based database URL
- Changed sqlalchemy.url in alembic.ini to use environment variable DATABASE_URL.
Refactor database connection to support PostgreSQL
- Updated db.py to use BigInteger for primary keys and adapt to PostgreSQL.
- Implemented asyncpg for asynchronous database operations.
- Added sequence adjustments for PostgreSQL after migrations.
Add migration script from SQLite to PostgreSQL
- Created migrate_sqlite_to_postgres.py to facilitate data migration from SQLite to PostgreSQL.
Implement a resilient downloader service
- Added download_manager.py with a ResilientDownloader class for robust file downloading.
- Supports multipart downloads, retries, and resuming interrupted downloads.
Refactor tests to accommodate new database and downloader structure
- Updated test_db.py to use DATABASE_URL for database connection in tests.
- Refactored Instagram handler tests to use the new InstagramService for downloading videos.