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

Add support for anon channel restrictions #4130

Merged
merged 1 commit into from Jun 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions telethon/client/chats.py
Expand Up @@ -1116,8 +1116,8 @@ async def edit_permissions(

user = await self.get_input_entity(user)
ty = helpers._entity_type(user)
if ty != helpers._EntityType.USER:
raise ValueError('You must pass a user entity')
if ty not in (helpers._EntityType.USER, helpers._EntityType.CHANNEL):
raise ValueError('You must pass a user or channel entity')

if isinstance(user, types.InputPeerSelf):
raise ValueError('You cannot restrict yourself')
Expand Down