diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 95461aca9..2bd99822e 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3127,7 +3127,8 @@ messageDocument document:document caption:formattedText = MessageContent; //@star_count Number of stars needed to buy access to the media in the message //@media Information about the media //@caption Media caption -messagePaidMedia star_count:int53 media:vector caption:formattedText = MessageContent; +//@show_caption_above_media True, if the caption must be shown above the media; otherwise, the caption must be shown below the media +messagePaidMedia star_count:int53 media:vector caption:formattedText show_caption_above_media:Bool = MessageContent; //@description A photo message //@photo The photo diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index ae55cce87..b23c70eea 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -7657,7 +7657,7 @@ tl_object_ptr get_message_content_object(const MessageCo return td_api::make_object( m->star_count, transform(m->media, [&](const auto &media) { return media.get_message_extended_media_object(td); }), - get_formatted_text_object(m->caption, skip_bot_commands, max_media_timestamp)); + get_formatted_text_object(m->caption, skip_bot_commands, max_media_timestamp), invert_media); } default: UNREACHABLE(); diff --git a/td/telegram/MessageContentType.cpp b/td/telegram/MessageContentType.cpp index 39e44aadb..7cbca29a7 100644 --- a/td/telegram/MessageContentType.cpp +++ b/td/telegram/MessageContentType.cpp @@ -156,6 +156,7 @@ StringBuilder &operator<<(StringBuilder &string_builder, MessageContentType cont bool is_allowed_invert_caption_message_content(MessageContentType content_type) { switch (content_type) { case MessageContentType::Animation: + case MessageContentType::PaidMedia: case MessageContentType::Photo: case MessageContentType::Video: return true;