Do not fetch link previews when editing message with attachment
This commit is contained in:
parent
ea92bd5f6f
commit
b4cafe1e0a
1 changed files with 9 additions and 6 deletions
|
@ -960,16 +960,19 @@ function onEditorStateChange({
|
|||
|
||||
// If we have attachments, don't add link preview
|
||||
if (
|
||||
!hasDraftAttachments(conversation.attributes.draftAttachments, {
|
||||
hasDraftAttachments(conversation.attributes.draftAttachments, {
|
||||
includePending: true,
|
||||
})
|
||||
}) ||
|
||||
Boolean(conversation.attributes.draftEditMessage?.attachmentThumbnail)
|
||||
) {
|
||||
maybeGrabLinkPreview(messageText, LinkPreviewSourceType.Composer, {
|
||||
caretLocation,
|
||||
conversationId,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
maybeGrabLinkPreview(messageText, LinkPreviewSourceType.Composer, {
|
||||
caretLocation,
|
||||
conversationId,
|
||||
});
|
||||
|
||||
dispatch({
|
||||
type: 'NOOP',
|
||||
payload: null,
|
||||
|
|
Loading…
Add table
Reference in a new issue