mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-11-20 01:35:15 +03:00
This partially reverts commit 5a3a94eb51.
It should be re-introduced once the rest of comments are addressed.
Session changes are kept for the future, even if unused for now,
as there may be people who have already upgraded their session.
20 lines
644 B
Python
20 lines
644 B
Python
import asyncio
|
|
|
|
|
|
class RequestState:
|
|
"""
|
|
This request state holds several information relevant to sent messages,
|
|
in particular the message ID assigned to the request, the container ID
|
|
it belongs to, the request itself, the request as bytes, and the future
|
|
result that will eventually be resolved.
|
|
"""
|
|
__slots__ = ('container_id', 'msg_id', 'request', 'data', 'future', 'after')
|
|
|
|
def __init__(self, request, after=None):
|
|
self.container_id = None
|
|
self.msg_id = None
|
|
self.request = request
|
|
self.data = bytes(request)
|
|
self.future = asyncio.Future()
|
|
self.after = after
|