Proper way to ban users writing via channels #46
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
backmeupplz/banofbot#46
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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_Botis 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
fromhas it'sis_botset to true (may also want to check if username isChannel_Botbut I guess it's not required) and a message has alsosender_chatkey with it'stypeset to "channel". Theidofsender_chatis what to be the second argument to a command, first one being the chat's id.This is a valid concern, I'll be happy to review and merge a PR that fixes this :)
Thank you for taking the time to report this, and sorry it sat without an answer for so long. I'm cleaning up old issues and closing this one because it has been inactive for a long time. If it still affects you, please open a new issue with the current details and I'll take a look.