Skip to content

Fix meme source admin link handling#296

Merged
ohld merged 1 commit into
productionfrom
codex/fix-source-admin-links
May 25, 2026
Merged

Fix meme source admin link handling#296
ohld merged 1 commit into
productionfrom
codex/fix-source-admin-links

Conversation

@ohld
Copy link
Copy Markdown
Member

@ohld ohld commented May 25, 2026

Summary

  • refresh moderator permissions from DB before denying source-admin actions so role grants are not blocked by stale Redis cache
  • accept common source link formats such as t.me/..., telegram.me/..., http://t.me/... and links embedded in text
  • grant @MearsM (1007266539) moderator/source-management access via migration

Tests

  • python -m pytest tests/tgbot/test_meme_source_handler.py tests/tgbot/test_moderator_permissions.py tests/storage/test_etl_candidates.py -q
  • python -m ruff check src/tgbot/handlers/moderator src/storage/etl.py tests/tgbot/test_meme_source_handler.py tests/tgbot/test_moderator_permissions.py tests/storage/test_etl_candidates.py alembic/versions/2026-05-25_grant_mearsm_source_moderation.py
  • DATABASE_URL=postgresql+asyncpg://app:app@localhost:65432/app REDIS_URL=redis://:myStrongPassword@localhost:36379 ... alembic upgrade head

@ohld ohld merged commit d51ea82 into production May 25, 2026
3 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