diff --git a/src/chat/ChatScreen.js b/src/chat/ChatScreen.js index 7c64e88..10dea84 100644 --- a/src/chat/ChatScreen.js +++ b/src/chat/ChatScreen.js @@ -200,7 +200,7 @@ export default function ChatScreen(props: Props): Node { () => undefined, ); - if ((content !== undefined && content !== '') || (topic !== undefined && topic !== '')) { + if (content !== undefined || topic !== undefined) { api.updateMessage(auth, editMessage.id, { content, subject: topic }).catch(error => { showErrorAlert(_('Failed to edit message'), error.message); }); @@ -287,4 +287,4 @@ export default function ChatScreen(props: Props): Node { )} ); -} +} \ No newline at end of file diff --git a/src/compose/ComposeBox.js b/src/compose/ComposeBox.js index a3e6d83..007d944 100644 --- a/src/compose/ComposeBox.js +++ b/src/compose/ComposeBox.js @@ -306,7 +306,7 @@ const ComposeBox: React$AbstractComponent = forwardRef( (videoChatProvider: VideoChatProvider) => { if (videoChatProvider.name === 'jitsi_meet') { // This is meant to align with the way the webapp generates jitsi video - // call IDs. That logic can be found in the ".video_link" click handler + // call IDs. That logic can be found in the "video_link" click handler // in static/js/compose.js. const videoCallId = randomInt(100000000000000, 999999999999999); const videoCallUrl = `${videoChatProvider.jitsiServerUrl}/${videoCallId}`; @@ -554,7 +554,7 @@ const ComposeBox: React$AbstractComponent = forwardRef( result.push('mandatory-topic-empty'); } - if (messageInputValue.trim().length === 0) { + if (!isEditing && messageInputValue.trim().length === 0) { result.push('message-empty'); } @@ -573,6 +573,7 @@ const ComposeBox: React$AbstractComponent = forwardRef( numUploading, anyQuoteAndReplyInProgress, messageInputState, + isEditing, ]); const submitButtonDisabled = validationErrors.length > 0; @@ -818,4 +819,4 @@ const ComposeBox: React$AbstractComponent = forwardRef( ); }); -export default ComposeBox; +export default ComposeBox; \ No newline at end of file