Message: Hide appendix if inline keys are present (#5055)

This commit is contained in:
zubiden 2024-10-20 18:53:31 +02:00 committed by Alexander Zinchuk
parent 5c16705b9c
commit 9133cd1535

View File

@ -58,6 +58,7 @@ export function buildContentClassName(
const isMedia = storyData || photo || video || location || invoice?.extendedMedia || paidMedia; const isMedia = storyData || photo || video || location || invoice?.extendedMedia || paidMedia;
const hasText = text || location?.mediaType === 'venue' || isGeoLiveActive || hasFactCheck; const hasText = text || location?.mediaType === 'venue' || isGeoLiveActive || hasFactCheck;
const isMediaWithNoText = isMedia && !hasText; const isMediaWithNoText = isMedia && !hasText;
const hasInlineKeyboard = Boolean(message.inlineButtons);
const isViaBot = Boolean(message.viaBotId); const isViaBot = Boolean(message.viaBotId);
const hasFooter = (() => { const hasFooter = (() => {
@ -183,7 +184,7 @@ export function buildContentClassName(
classNames.push('has-fact-check'); classNames.push('has-fact-check');
} }
if (isLastInGroup && (photo || !isMediaWithNoText || (location && asForwarded))) { if (isLastInGroup && !hasInlineKeyboard && (photo || !isMediaWithNoText || (location && asForwarded))) {
classNames.push('has-appendix'); classNames.push('has-appendix');
} }
} }