fix minigroup leaving

This commit is contained in:
nailer 2018-09-28 13:50:44 +03:00
parent dc7527c762
commit ed09a1377e

View File

@ -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))