Trim leading and trailing whitespace on message composition and display.
This commit is contained in:
parent
3ecdb659d8
commit
aeb5caf921
|
@ -843,7 +843,7 @@ class CompositionBoxInner extends React.Component<Props, State> {
|
|||
// this does not call call removeAllStagedAttachmentsInConvers
|
||||
const { attachments, previews } = await this.getFiles(linkPreview);
|
||||
this.props.sendMessage({
|
||||
body: messagePlaintext,
|
||||
body: messagePlaintext.trim(),
|
||||
attachments: attachments || [],
|
||||
quote: extractedQuotedMessageProps,
|
||||
preview: previews,
|
||||
|
|
|
@ -31,7 +31,7 @@ export const MessageText = (props: Props) => {
|
|||
? window.i18n('messageDeletedPlaceholder')
|
||||
: direction === 'incoming' && status === 'error'
|
||||
? window.i18n('incomingError')
|
||||
: text;
|
||||
: text?.trim();
|
||||
|
||||
if (!contents) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue