Skip to main content

Module tl

Module tl 

Source
Expand description

Inner TL layer of Telegram secret chats.

These types live inside the encrypted data field of messages.sendEncrypted. They are not part of the outer MTProto TL schema, so they are serialized and parsed by hand here rather than by ferogram-tl-types.

Structs§

DecryptedMessageLayer
The outer wrapper of every secret chat message (layer 17 and above).

Enums§

DecryptedAction
A service action carried inside a decryptedMessageService.
DecryptedMedia
Media payload of a decrypted message.
DecryptedMessage
A decrypted message as carried inside DecryptedMessageLayer.
DocumentAttribute
Document attributes carried inside DecryptedMedia::Document.

Constants§

ID_ACTION_ABORT_KEY
Constructor ID of decryptedMessageActionAbortKey.
ID_ACTION_ACCEPT_KEY
Constructor ID of decryptedMessageActionAcceptKey.
ID_ACTION_COMMIT_KEY
Constructor ID of decryptedMessageActionCommitKey.
ID_ACTION_DELETE_MESSAGES
Constructor ID of decryptedMessageActionDeleteMessages (parsed only).
ID_ACTION_FLUSH_HISTORY
Constructor ID of decryptedMessageActionFlushHistory (parsed only).
ID_ACTION_NOOP
Constructor ID of decryptedMessageActionNoop.
ID_ACTION_NOTIFY_LAYER
Constructor ID of decryptedMessageActionNotifyLayer.
ID_ACTION_READ_MESSAGES
Constructor ID of decryptedMessageActionReadMessages (parsed only).
ID_ACTION_REQUEST_KEY
Constructor ID of decryptedMessageActionRequestKey.
ID_ACTION_RESEND
Constructor ID of decryptedMessageActionResend.
ID_ACTION_SCREENSHOT_MESSAGES
Constructor ID of decryptedMessageActionScreenshotMessages (parsed only).
ID_ACTION_SET_TTL
Constructor ID of decryptedMessageActionSetMessageTTL.
ID_ACTION_TYPING
Constructor ID of decryptedMessageActionTyping (parsed only).
ID_ATTR_ANIMATED
Constructor ID of documentAttributeAnimated.
ID_ATTR_AUDIO
Constructor ID of documentAttributeAudio.
ID_ATTR_FILENAME
Constructor ID of documentAttributeFilename.
ID_ATTR_IMAGE_SIZE
Constructor ID of documentAttributeImageSize.
ID_ATTR_STICKER
Constructor ID of documentAttributeSticker as used in secret chats (layer 17 and above).
ID_ATTR_VIDEO
Constructor ID of documentAttributeVideo.
ID_DECRYPTED_MESSAGE
Constructor ID of decryptedMessage (layer 73 and above).
ID_DECRYPTED_MESSAGE_LAYER
Constructor ID of decryptedMessageLayer, the wrapper around every message from layer 17 on.
ID_DECRYPTED_MESSAGE_OLD
Constructor ID of decryptedMessage before layer 73.
ID_DECRYPTED_MESSAGE_SERVICE
Constructor ID of decryptedMessageService (layer 17 and above).
ID_DECRYPTED_MESSAGE_SERVICE8
Constructor ID of decryptedMessageService (layer 8).
ID_MEDIA_AUDIO_L8
Constructor ID of decryptedMessageMediaAudio (layer 8).
ID_MEDIA_AUDIO_L17
Constructor ID of decryptedMessageMediaAudio (layer 17).
ID_MEDIA_CONTACT
Constructor ID of decryptedMessageMediaContact.
ID_MEDIA_DOCUMENT
Constructor ID of decryptedMessageMediaDocument (layer 143 and above).
ID_MEDIA_DOCUMENT_OLD
Constructor ID of decryptedMessageMediaDocument (layer 8).
ID_MEDIA_EMPTY
Constructor ID of decryptedMessageMediaEmpty.
ID_MEDIA_GEO
Constructor ID of decryptedMessageMediaGeoPoint.
ID_MEDIA_PHOTO
Constructor ID of decryptedMessageMediaPhoto (layer 45 and above).
ID_MEDIA_PHOTO_OLD
Constructor ID of decryptedMessageMediaPhoto (layer 8).
ID_MEDIA_VENUE
Constructor ID of decryptedMessageMediaVenue (layer 45).
ID_MEDIA_VIDEO_L8
Constructor ID of decryptedMessageMediaVideo (layer 8).
ID_MEDIA_VIDEO_L17
Constructor ID of decryptedMessageMediaVideo (layer 17).
ID_MEDIA_VIDEO_L45
Constructor ID of decryptedMessageMediaVideo (layer 45).

Functions§

deserialize_media
Parse a media object from data starting at *offset, advancing the offset.
deserialize_message_layer
Parse a DecryptedMessageLayer from decrypted bytes.
make_random_bytes
Build the random_bytes field of a DecryptedMessageLayer.
serialize_layer8_service
Serialize a layer-8 service message (no DecryptedMessageLayer wrapper).
serialize_media
Serialize media into buf (constructor ID followed by its fields).
serialize_message_layer
Serialize a DecryptedMessageLayer to bytes, ready for crypto::encrypt_message.