Composer: Fix paste text links (#6260)
This commit is contained in:
parent
0d6388b3d9
commit
1a4aae6fef
@ -20,6 +20,8 @@ type OwnProps = {
|
|||||||
chatId?: string;
|
chatId?: string;
|
||||||
messageId?: number;
|
messageId?: number;
|
||||||
threadId?: ThreadId;
|
threadId?: ThreadId;
|
||||||
|
entityType?: ApiMessageEntityTypes.Url | ApiMessageEntityTypes.TextUrl |
|
||||||
|
`${ApiMessageEntityTypes.TextUrl}` | `${ApiMessageEntityTypes.Url}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const SafeLink = ({
|
const SafeLink = ({
|
||||||
@ -32,6 +34,7 @@ const SafeLink = ({
|
|||||||
chatId,
|
chatId,
|
||||||
messageId,
|
messageId,
|
||||||
threadId,
|
threadId,
|
||||||
|
entityType = ApiMessageEntityTypes.Url,
|
||||||
}: OwnProps) => {
|
}: OwnProps) => {
|
||||||
const { openUrl } = getActions();
|
const { openUrl } = getActions();
|
||||||
|
|
||||||
@ -73,7 +76,7 @@ const SafeLink = ({
|
|||||||
className={classNames}
|
className={classNames}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
dir={isRtl ? 'rtl' : 'auto'}
|
dir={isRtl ? 'rtl' : 'auto'}
|
||||||
data-entity-type={ApiMessageEntityTypes.Url}
|
data-entity-type={entityType}
|
||||||
>
|
>
|
||||||
{content}
|
{content}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -619,6 +619,7 @@ function processEntity({
|
|||||||
chatId={chatId}
|
chatId={chatId}
|
||||||
messageId={messageId}
|
messageId={messageId}
|
||||||
threadId={threadId}
|
threadId={threadId}
|
||||||
|
entityType={entity.type}
|
||||||
>
|
>
|
||||||
{renderNestedMessagePart()}
|
{renderNestedMessagePart()}
|
||||||
</SafeLink>
|
</SafeLink>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user