Composer: Fix paste text links (#6260)

This commit is contained in:
Alexander Zinchuk 2025-09-19 14:35:37 +02:00
parent 0d6388b3d9
commit 1a4aae6fef
2 changed files with 5 additions and 1 deletions

View File

@ -20,6 +20,8 @@ type OwnProps = {
chatId?: string;
messageId?: number;
threadId?: ThreadId;
entityType?: ApiMessageEntityTypes.Url | ApiMessageEntityTypes.TextUrl |
`${ApiMessageEntityTypes.TextUrl}` | `${ApiMessageEntityTypes.Url}`;
};
const SafeLink = ({
@ -32,6 +34,7 @@ const SafeLink = ({
chatId,
messageId,
threadId,
entityType = ApiMessageEntityTypes.Url,
}: OwnProps) => {
const { openUrl } = getActions();
@ -73,7 +76,7 @@ const SafeLink = ({
className={classNames}
onClick={handleClick}
dir={isRtl ? 'rtl' : 'auto'}
data-entity-type={ApiMessageEntityTypes.Url}
data-entity-type={entityType}
>
{content}
</a>

View File

@ -619,6 +619,7 @@ function processEntity({
chatId={chatId}
messageId={messageId}
threadId={threadId}
entityType={entity.type}
>
{renderNestedMessagePart()}
</SafeLink>