Repository navigation
feat(bot): check Telegram admin rights before honouring group commands - #582
Dev-Savio-hub wants to merge 4 commits into
Conversation
|
@Dev-Savio-hub Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Thanks for the contribution. The PR is currently blocked because the main branch has advanced and GitHub reports a merge conflict. Please update or rebase the branch against main, resolve the conflict, and rerun the checks. We will be happy to merge it after that. |
|
Hi @Dev-Savio-hub, thank you for your contribution. This PR is not currently in a mergeable state on GitHub, and its mergeability cannot be confirmed after recent repository updates, so I cannot merge it as-is. Please recreate or rebase your branch from the current main branch and push an updated branch so we can review it again. This is a mergeability/update note, not a malware finding. Once the branch is updated, we will review it again. Thank you! |
this pr closes #406
Summary
src/commands/admin-check.tswithisChatAdminusinggetChatMember, backed by a bounded TTL cache (AdminCache) and in-flight request deduplication.sender_chat.id === chat.id) as authorised administrators without requiring afrom.idor extra API call.canControl(ctx, config, api)and wire it into operator commands and callbacks insrc/bot.ts, keeping private-chat authorization restricted strictly toOPERATOR_TELEGRAM_USER_ID.false) ongetChatMembererrors and log warnings with secret redaction viasafeErrorMessage.tests/admin-check.test.mjscoveringadministrator/creator, regularmember, anonymous admin, API errors (with token redaction), TTL cache hits/expiry, and bounded cache eviction.