fix: correctness and release hygiene (v7.4.2)#100
Merged
Conversation
- Fix _log_stats() KeyError on shutdown: use actual get_stats() keys (rate_limits_triggered, operations_blocked, chats_rate_limited) - Fix pin/unpin realtime: add PIN to NotificationType enum, add to listener type_map, add pin handler in WebSocket frontend - Sync pyproject.toml version (was 7.2.0) with __init__.py (7.4.2) - Fix WebSocket subscribe ACL: return subscribe_denied when chat is outside the user's allowed list instead of silent success
|
🐳 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 |
…ontend - Forward pin events in handle_realtime_notification() to WebSocket clients - Add subscribe_denied case to frontend WebSocket handler
|
🐳 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
Addresses 4 findings from post-v7.4.1 review — correctness bugs and release hygiene, no new security issues.
_log_stats()KeyError on shutdown (Medium):_log_stats()readbursts_detected,operations_discarded,chats_protectedbutMassOperationProtector.get_stats()returnsrate_limits_triggered,operations_blocked,chats_rate_limited. A clean listener shutdown would raiseKeyError. Fixed to use the actual keys._notify_update("pin", ...)butNotificationTypehad noPINvariant and the WebSocket handler didn't handle it. AddedPINto the enum, to the listener's type_map, and acase 'pin'handler in the frontend that reloads pinned messages for the current chat.7.2.0while__init__.pyand tags were at7.4.1. Synced both to7.4.2.ConnectionManager.subscribe()silently ignored unauthorized chats but always replied{"type": "subscribed"}. Now returnssubscribe_deniedwhen the ACL blocks the subscription.Test plan
pytest tests/ --ignore=tests/test_telegram_import.py)pip install/pip showreports correct versionsubscribe_deniedfor unauthorized chats