Allow forward of image attachment with no text
This commit is contained in:
@@ -118,8 +118,16 @@ export const ForwardMessageModal: FunctionComponent<PropsType> = ({
|
||||
[inputApiRef, onPickEmoji]
|
||||
);
|
||||
|
||||
const hasContactsSelected = Boolean(selectedContacts.length);
|
||||
|
||||
const canForwardMessage =
|
||||
hasContactsSelected &&
|
||||
(Boolean(messageBodyText) ||
|
||||
isSticker ||
|
||||
(attachmentsToForward && attachmentsToForward.length));
|
||||
|
||||
const forwardMessage = React.useCallback(() => {
|
||||
if (!messageBodyText) {
|
||||
if (!canForwardMessage) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -131,20 +139,13 @@ export const ForwardMessageModal: FunctionComponent<PropsType> = ({
|
||||
);
|
||||
}, [
|
||||
attachmentsToForward,
|
||||
canForwardMessage,
|
||||
doForwardMessage,
|
||||
linkPreview,
|
||||
messageBodyText,
|
||||
selectedContacts,
|
||||
]);
|
||||
|
||||
const hasContactsSelected = Boolean(selectedContacts.length);
|
||||
|
||||
const canForwardMessage =
|
||||
hasContactsSelected &&
|
||||
(Boolean(messageBodyText) ||
|
||||
isSticker ||
|
||||
(attachmentsToForward && attachmentsToForward.length));
|
||||
|
||||
const normalizedSearchTerm = searchTerm.trim();
|
||||
useEffect(() => {
|
||||
const timeout = setTimeout(() => {
|
||||
|
Reference in New Issue
Block a user