code-review-fixes #6
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
signal-works/gladiator_telegram_bot!6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-review-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements 53 tests covering all ParameterService functionality: Test Coverage: - defineParameter(): Validation, type checking, protected parameters - get(): Cache loading, type safety, defaults, error handling - set(): Updates, history recording, validation, protected params - getHistory(): Change tracking, ordering, limits, metadata - listParameters(): Filtering, sorting, metadata - exportParameters(): JSON export, category filtering - reloadCache(): Cache invalidation and refresh - Edge cases: Empty strings, zero values, nested JSON, special chars - Concurrent operations: Parallel updates, race conditions - SqliteAdapter integration: Persistence, transactions All tests use in-memory SQLite for fast, isolated execution. Test Results: ✅ 53/53 passing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Connect runtime-editable parameters to actual menu display, making parameter changes immediately visible to users. Implementation: - src/config/menu-content.json: Replaced hardcoded values with {{parameter.key}} placeholders • Bitcoin addresses → {{payment.bitcoin.telegram}} • Service URLs → {{service.url.bulk}}, {{service.url.gold}}, etc. • Download codes → {{download.code.premium_tivimate}}, {{download.code.platinum}} • Referral links → {{referral.vpn.express}}, {{referral.vpn.proton}} • Contact info → {{contact.admin.primary}} - src/utils/helpers.ts: Added replaceParams() function • Replaces {{key}} placeholders with actual parameter values • Graceful fallback if parameter not found (keeps placeholder) • Logs warnings for missing parameters - src/menus/factory.ts: Integrated ParameterService into menu factory • Added paramService to MenuFactoryDeps interface • Text menus now use replaceParams() before sending content • Video/photo captions also support parameter replacement - src/menus/index.ts: Updated createMenuSystem to accept ParameterService • Payment menu manually created items now use replaceParams() • All menu content is dynamically generated from parameters - src/bot.ts: Pass ParameterService to createMenuSystem Impact: - Admins can now use /setparam to change URLs, wallet addresses, etc. - Changes appear immediately in menu responses (no restart needed) - No more hardcoded values scattered throughout menu content - Single source of truth for all dynamic configuration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>