')
- if forward_html:
+ if forward_html:
content_body.append(forward_html) # Forward info
content_body.append("
")
- if reply_html:
+ if reply_html:
content_body.append(reply_html) # Reply info
content_body.append("
")
- if text_html:
- content_body.append(text_html) # Post text
- content_body.append("
")
+
+ show_caption_above = getattr(message, 'show_caption_above_media', False)
- content_body.append(media_html) # Media
- content_body.append("
")
+ if show_caption_above:
+ if media_html:
+ content_body.append(media_html)
+ content_body.append("
")
+ if text_html:
+ content_body.append(text_html)
+ content_body.append("
")
+ else:
+ if text_html:
+ content_body.append(text_html)
+ content_body.append("
")
+ if media_html:
+ content_body.append(media_html)
+ content_body.append("
")
if poll_html: content_body.append(poll_html) # Poll
if message.forward_origin: content_body.append(f"--- Forwarded post end ---") # Forward info end