Skip to main content

Module media_send

Module media_send 

Source
Expand description

Final media-message metadata. CDN upload and message submission are separate steps; persist source bytes, generated keys and intent before either step.

Structs§

MediaSendResult
VoiceUpload
One voice note submitted through uploadvoice. A note of at most VOICE_UPLOAD_CHUNK_BYTES uses a single request with the end flag set. A larger note is sent as consecutive byte ranges (offset/length) under the same client message ID; only the last range sets the end flag, and later ranges carry a server message ID returned for an earlier range. Each range is submitted once: an error after any submission is an uncertain outcome.

Enums§

SendStatus

Constants§

VOICE_UPLOAD_CHUNK_BYTES
Encoded SILK bytes carried by one uploadvoice request. A short-link request travels in one MMTLS record of at most 65,519 plaintext bytes, including the route, packet header and envelope, so a 60-second note (about 126-131 KB from the bundled 16 kbit/s profile) cannot use one request. 32 KiB matches the downloadvoice range size and leaves room for that overhead.

Functions§

decode_file_send
decode_file_send_correlated
Correlate the final reply for a reserved file with its submitted intent.
decode_image_send
decode_video_send
decode_voice_send
Decode the reply to the request carrying a note’s end flag.
file_send_request
file_send_request_with_reservation
file_xml
file_xml_with_reservation
image_send_request
local_file_xml
local_file_xml_with_reservation
local_image_xml
local_video_xml
local_voice_xml
share_send_request
share_xml
Generic URL shares use app subtype 5. Metadata is supplied by the caller; composing or sending a card never fetches the target page or thumbnail.
video_send_request