Composer: Fix paste text links (#6260)
This commit is contained in:
parent
0d6388b3d9
commit
1a4aae6fef
@ -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>
|
||||
|
||||
@ -619,6 +619,7 @@ function processEntity({
|
||||
chatId={chatId}
|
||||
messageId={messageId}
|
||||
threadId={threadId}
|
||||
entityType={entity.type}
|
||||
>
|
||||
{renderNestedMessagePart()}
|
||||
</SafeLink>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user