Skip to content

Conversation

@rayz1065
Copy link
Member

@rayz1065 rayz1065 commented Aug 6, 2025

Currently anonymous admins are unable to use admin scoped commands, despite them being displayed in the user interface. The docs say about sender_chat:

Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. [...]

There should be no other way to send a message on behalf of a group.

This pull request updates the isAdmin function to take into account anonymous admins.

roziscoding
roziscoding previously approved these changes Aug 7, 2025
Copy link
Contributor

@roziscoding roziscoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought
@carafelix can you please TAL at this?

Copy link
Member

@carafelix carafelix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really glad to see this PR. A well thought addition.

Requested changes are mostly about unused lines.

I think lines 1030-1032 need an explanation or change.

Thanks for checking out on this.

Remove `from` field when `sender_chat` is specified in test

Co-authored-by: Hero Protagonist <[email protected]>
Copy link
Member

@carafelix carafelix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the further explanations

@carafelix carafelix merged commit 9eed73c into main Aug 21, 2025
6 checks passed
@KnorpelSenf KnorpelSenf deleted the handle-anonymous-admins branch August 21, 2025 06:14
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.

3 participants