Skip to content

Conversation

@kotopyos
Copy link

Description

Fix of the issue where AbilityBot ignored updates from Channels (Issue #1531).

Changes

  1. BaseAbilityBot:

    • Updated getAbility to strictly check for ChannelPost and EditedChannelPost.
    • Updated hasUser to allow updates from channels (where user is empty).
    • Updated getPrivacy to assign Privacy.GROUP_ADMIN rights to channel posts (only admins are able to post on channels).
  2. AbilityUtils:

    • Added getMessage(Update update) helper to abstract update type extraction (onyl for Message and ChannelPost for now).
  3. Tests:

    • Added unit tests in TestAbilityBotChannel. Cases: channel posts and edited channel posts.

Issueu #1531

@kotopyos kotopyos force-pushed the fix-issue-1531-channel-ability branch from f8ea821 to 415f6c7 Compare December 22, 2025 15:02
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