decryptedMessage #

Contents of an encrypted message.

Layer 223

===8===
decryptedMessage#1f814f1f random_id:long random_bytes:bytes message:string media:DecryptedMessageMedia = DecryptedMessage;

===17===
decryptedMessage#204d3878 random_id:long ttl:int message:string media:DecryptedMessageMedia = DecryptedMessage;

===45===
decryptedMessage#36b091de flags:# random_id:long ttl:int message:string media:flags.9?DecryptedMessageMedia entities:flags.7?Vector<MessageEntity> via_bot_name:flags.11?string reply_to_random_id:flags.3?long = DecryptedMessage;

===73===
decryptedMessage#91cc4674 flags:# no_webpage:flags.1?true silent:flags.5?true random_id:long ttl:int message:string media:flags.9?DecryptedMessageMedia entities:flags.7?Vector<MessageEntity> via_bot_name:flags.11?string reply_to_random_id:flags.3?long grouped_id:flags.17?long = DecryptedMessage;

Parameters #

NameTypeDescription
random_idlongRandom message ID, assigned by the author of message.
Must be equal to the ID passed to sending method. See here » for more info on random ID deduplication and updateMessageID mapping.
random_bytesbytesRandom bytes, removed in layer 17.
messagestringMessage text
mediaflags.9?DecryptedMessageMediaMedia content
ttlintMessage lifetime. Has higher priority than decryptedMessageActionSetMessageTTL.
Parameter added in Layer 17.
flags#Flags, see TL conditional fields (added in layer 45)
entitiesflags.7?Vector<MessageEntity>Message entities for styled text (parameter added in layer 45)
via_bot_nameflags.11?stringSpecifies the ID of the inline bot that generated the message (parameter added in layer 45)
reply_to_random_idflags.3?longRandom message ID of the message this message replies to (parameter added in layer 45)
grouped_idflags.17?longRandom group ID, assigned by the author of message.
Multiple encrypted messages with a photo attached and with the same group ID indicate an album or grouped media (parameter added in layer 45)

Type #

DecryptedMessage

Working with Updates #

How to subscribe to updates and handle them properly.

decryptedMessageActionSetMessageTTL #

Setting of a message lifetime after reading.

Upon receiving such message the client shall start deleting of all messages of an encrypted chat ttl_seconds seconds after the messages were read by user.

Styled text with message entities #

How to create styled text with message entities

Uploading and Downloading Files #

How to transfer large data batches correctly.