mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-07 13:34:59 +03:00
fix minigroup leaving
This commit is contained in:
parent
dc7527c762
commit
ed09a1377e
|
@ -99,6 +99,10 @@ class Dialog:
|
|||
async def delete(self):
|
||||
if self.is_channel:
|
||||
await self._client(functions.channels.LeaveChannelRequest(self.input_entity))
|
||||
elif self.is_group:
|
||||
await self._client(functions.messages.DeleteChatUserRequest(self.entity.id,
|
||||
types.InputPeerSelf()))
|
||||
await self._client(functions.messages.DeleteHistoryRequest(self.input_entity, 0, just_clear=False))
|
||||
else:
|
||||
await self._client(functions.messages.DeleteHistoryRequest(self.input_entity, 0))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user