Don't allow link preview and draft attachment at the same time
This commit is contained in:
@@ -679,7 +679,11 @@ function onEditorStateChange(
|
|||||||
debouncedSaveDraft(conversationId, messageText, bodyRanges);
|
debouncedSaveDraft(conversationId, messageText, bodyRanges);
|
||||||
|
|
||||||
// If we have attachments, don't add link preview
|
// 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, {
|
maybeGrabLinkPreview(messageText, LinkPreviewSourceType.Composer, {
|
||||||
caretLocation,
|
caretLocation,
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user