Add a comment

This commit is contained in:
YouTwitFace 2019-10-11 11:27:08 -04:00
parent 2fd589aa8a
commit a9437db80c

View File

@ -873,6 +873,9 @@ class ChatMethods:
) )
if isinstance(entity, types.InputPeerChannel): if isinstance(entity, types.InputPeerChannel):
# If we try to set these permissions in a megagroup, we
# would get a RIGHT_FORBIDDEN. However, it makes sense
# that an admin can post messages, so we want to avoid the error
if post_messages or edit_messages: if post_messages or edit_messages:
full_entity = await self.get_entity(entity) full_entity = await self.get_entity(entity)
if full_entity.megagroup: if full_entity.megagroup: