miniproto.invoke.wrap_raw_request
miniproto.invoke.wrap_raw_request
Section titled “miniproto.invoke.wrap_raw_request”wrap_raw_request(raw_request: object, config: ClientConfig, *, needs_init: bool = True, without_updates: bool = False) -> objectWrap a raw request for transmission.
invokeWithLayer(initConnection(...)) is only added when needs_init is true,
i.e. for the first request after a sender (re)connects. Media-lane senders
additionally wrap that first request in invokeWithoutUpdates so dedicated file
sessions never receive update traffic. Serialization happens exactly once, inside
the sender, when the message body is encoded.
Parameters:
- raw_request (
object) – Constructor-backed Telegram request or an existing invocation envelope. - config (
ClientConfig) – Client device and API configuration used to createinitConnection. - needs_init (
bool) – Whether this sender’s next request still requires initialization wrapping. - without_updates (
bool) – Wrap a media-lane initialization ininvokeWithoutUpdates.