Skip to content

Fix settings access for groups with a non-admin bot - #264

Merged
iamwavecut merged 1 commit into
mainfrom
fix/settings-non-admin-bot
Oct 16, 2026
Merged

iamwavecut merged 1 commit into
mainfrom
fix/settings-non-admin-bot

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

Opening group settings fails with HTTP 500 when a non-admin bot receives CHAT_ADMIN_REQUIRED from Telegram getChatMember, even for an administrator who has permission to manage settings.

On this specific Telegram 400 response, resolve the caller from a fresh getChatAdministrators response. Both the Settings WebApp and the group settings command use this adapter. Existing owner/admin permission checks remain in place. A missing caller, failed fallback, or unrelated Telegram error does not grant access.

Validation:

  • Reproduced the regression before the fix with a local Bot API HTTP fixture.
  • cargo test --locked -p openplotva-app: 1,411 passed, 7 ignored, 0 failed.
  • cargo clippy --locked --workspace --all-targets -- -D warnings: passed.
  • cargo fmt --all -- --check and git diff --check: passed.
  • Regression coverage includes owners, administrators with and without promotion rights, absent callers, fallback errors, successful direct lookups, and unrelated Telegram errors.

@github-actions

Copy link
Copy Markdown
Messages
📖 Danger checked 1 changed file(s).

Generated by 🚫 dangerJS against 5cfa32a

@iamwavecut
iamwavecut merged commit 9185d32 into main Oct 16, 2026
12 checks passed
@iamwavecut
iamwavecut deleted the fix/settings-non-admin-bot branch October 16, 2026 12:01
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