Don't allow link preview and draft attachment at the same time
This commit is contained in:
parent
3410971663
commit
7a076be0e7
1 changed files with 5 additions and 1 deletions
|
@ -679,7 +679,11 @@ function onEditorStateChange(
|
|||
debouncedSaveDraft(conversationId, messageText, bodyRanges);
|
||||
|
||||
// If we have attachments, don't add link preview
|
||||
if (!hasDraftAttachments(conversation.attributes, { includePending: true })) {
|
||||
if (
|
||||
!hasDraftAttachments(conversation.attributes.draftAttachments, {
|
||||
includePending: true,
|
||||
})
|
||||
) {
|
||||
maybeGrabLinkPreview(messageText, LinkPreviewSourceType.Composer, {
|
||||
caretLocation,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue