mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Revisit and remove a few TODOs
This commit is contained in:
@@ -138,7 +138,6 @@ class ChatMethods(UserMethods):
|
||||
return
|
||||
|
||||
elif isinstance(entity, types.InputPeerChat):
|
||||
# TODO We *could* apply the `filter` here ourselves
|
||||
full = await self(
|
||||
functions.messages.GetFullChatRequest(entity.chat_id))
|
||||
if not isinstance(
|
||||
|
@@ -111,7 +111,7 @@ class DialogMethods(UserMethods):
|
||||
return dialogs
|
||||
|
||||
@async_generator
|
||||
async def iter_drafts(self): # TODO: Ability to provide a `filter`
|
||||
async def iter_drafts(self):
|
||||
"""
|
||||
Iterator over all open draft messages.
|
||||
|
||||
|
@@ -219,13 +219,6 @@ class TelegramBaseClient(abc.ABC):
|
||||
self._last_ping = datetime.now()
|
||||
self._ping_delay = timedelta(minutes=1)
|
||||
|
||||
# Also have another delay for GetStateRequest.
|
||||
#
|
||||
# If the connection is kept alive for long without invoking any
|
||||
# high level request the server simply stops sending updates.
|
||||
# TODO maybe we can have ._last_request instead if any req works?
|
||||
self._last_state = datetime.now()
|
||||
self._state_delay = timedelta(hours=1)
|
||||
self._state = None
|
||||
self._updates_handle = None
|
||||
self._last_request = time.time()
|
||||
@@ -295,8 +288,6 @@ class TelegramBaseClient(abc.ABC):
|
||||
Disconnects from Telegram.
|
||||
"""
|
||||
await self._sender.disconnect()
|
||||
# TODO What to do with the update state? Does it belong here?
|
||||
# self.session.set_update_state(0, self.updates.get_update_state(0))
|
||||
self.session.close()
|
||||
|
||||
async def _switch_dc(self, new_dc):
|
||||
|
Reference in New Issue
Block a user