Skip to content

feat: add trusted user management and trusted list metadata#12

Merged
rezhajulio merged 3 commits into
mainfrom
feat/internal-team
May 18, 2026
Merged

feat: add trusted user management and trusted list metadata#12
rezhajulio merged 3 commits into
mainfrom
feat/internal-team

Conversation

@rezhajulio
Copy link
Copy Markdown
Owner

Summary

  • add global trusted-user management (/trust, /untrust) for admin DM flows
  • add /trusted command to list trusted users
  • trusted users now bypass anti-spam + duplicate-spam enforcement only
  • trusting a user clears probation and attempts unrestrict across monitored groups
  • extend /check action keyboard with trust/untrust actions
  • preload trusted-user cache at startup and keep cache synced on mutations
  • enrich /trusted output with who trusted the user and when (UTC)

Verification

  • uv run ruff check .
  • uv run pytest --cov=bot --cov-report=term-missing

Result

  • 596 tests passed
  • total coverage: 99%

@rezhajulio rezhajulio force-pushed the feat/internal-team branch from 5338140 to fe20c42 Compare May 16, 2026 09:23
- Transition trusted_user_ids cache from list to set for O(1) lookups.
- Implement lazy loading for the trusted user cache to reduce DB calls.
- Add Trust/Untrust User inline buttons to the /check command.
- Standardize trust-related messages and add Markdown support.
- Update database service with stricter group-id validation for trust lookups.
- Comprehensive test updates for cache semantics and UI changes.
@rezhajulio rezhajulio merged commit bb73788 into main May 18, 2026
5 checks passed
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