Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper way to ban users writing via channels #46

Open
eugenweissbart opened this issue Jul 20, 2022 · 1 comment
Open

Proper way to ban users writing via channels #46

eugenweissbart opened this issue Jul 20, 2022 · 1 comment

Comments

@eugenweissbart
Copy link

As of now, when you try to ban a user who is writing to a group using his channel, instead of blocking the channel, an internal TG entity called Channel_Bot is banned.
A proper way to block the channel would be to issue a banChatSenderChat command. To distinguish that it is a channel writing to the chat, you might want to check that from has it's is_bot set to true (may also want to check if username is Channel_Bot but I guess it's not required) and a message has also sender_chat key with it's type set to "channel". The id of sender_chat is what to be the second argument to a command, first one being the chat's id.

@backmeupplz
Copy link
Owner

This is a valid concern, I'll be happy to review and merge a PR that fixes this :)

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

No branches or pull requests

2 participants