Allow forward of image attachment with no text
This commit is contained in:
parent
a76534ed45
commit
d91a4ef3a6
1 changed files with 10 additions and 9 deletions
|
@ -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(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue