Embedded Message: Add no caption text in text content (#6219)

This commit is contained in:
Alexander Zinchuk 2025-09-19 14:35:02 +02:00
parent cc7917b229
commit 3146f58abc
4 changed files with 9 additions and 0 deletions

View File

@ -2280,3 +2280,4 @@
"ContextMenuHintTouch" = "To edit or reply, close this menu. Then long tap on a message.";
"GiftValueForSaleOnFragment" = "for sale on Fragment";
"GiftValueForSaleOnTelegram" = "for sale on Telegram";
"EmbeddedMessageNoCaption" = "Caption removed";

View File

@ -65,6 +65,7 @@ type OwnProps = {
requestedChatTranslationLanguage?: string;
isOpen?: boolean;
isMediaNsfw?: boolean;
noCaptions?: boolean;
observeIntersectionForLoading?: ObserveFn;
observeIntersectionForPlaying?: ObserveFn;
onClick: ((e: React.MouseEvent) => void);
@ -90,6 +91,7 @@ const EmbeddedMessage: FC<OwnProps> = ({
chatTranslations,
requestedChatTranslationLanguage,
isMediaNsfw,
noCaptions,
observeIntersectionForLoading,
observeIntersectionForPlaying,
onClick,
@ -199,6 +201,10 @@ const EmbeddedMessage: FC<OwnProps> = ({
return customText || renderMediaContentType(containedMedia) || NBSP;
}
if (noCaptions) {
return lang('EmbeddedMessageNoCaption');
}
return (
<MessageSummary
message={message}

View File

@ -310,6 +310,7 @@ const ComposerEmbeddedMessage: FC<OwnProps & StateProps> = ({
sender={!noAuthors ? sender : undefined}
composerForwardSenders={forwardSenders}
customText={customText}
noCaptions={noCaptions}
title={(editingId && !isShowingReply) ? oldLang('EditMessage')
: noAuthors ? oldLang('HiddenSendersNameDescription') : undefined}
onClick={handleMessageClick}

View File

@ -1704,6 +1704,7 @@ export interface LangPair {
'ContextMenuHintTouch': undefined;
'GiftValueForSaleOnFragment': undefined;
'GiftValueForSaleOnTelegram': undefined;
'EmbeddedMessageNoCaption': undefined;
}
export interface LangPairWithVariables<V = LangVariable> {