diff --git a/ts/components/conversation/MessageBody.tsx b/ts/components/conversation/MessageBody.tsx index 4693e6aa7..238939739 100644 --- a/ts/components/conversation/MessageBody.tsx +++ b/ts/components/conversation/MessageBody.tsx @@ -14,6 +14,7 @@ import type { LocalizerType } from '../../types/Util'; import { MessageTextRenderer } from './MessageTextRenderer'; import type { RenderLocation } from './MessageTextRenderer'; import { UserText } from '../UserText'; +import { shouldLinkifyMessage } from '../../types/LinkPreview'; export type Props = { author?: string; @@ -59,6 +60,8 @@ export function MessageBody({ textAttachment, }: Props): JSX.Element { const hasReadMore = Boolean(onIncreaseTextLength); + + const shouldDisableLinks = disableLinks || !shouldLinkifyMessage(text); const textWithSuffix = textAttachment?.pending || hasReadMore ? `${text}...` : text; @@ -119,7 +122,7 @@ export function MessageBody({