From 072c767b68491a42d4dcce61370b367ce1590d46 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Thu, 20 Oct 2022 11:52:50 +0200 Subject: [PATCH] Fix suppression when message is empty --- .../utils/createMessageContent.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts b/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts index fe7f7706b4..f0488e4599 100644 --- a/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts +++ b/src/components/views/rooms/wysiwyg_composer/utils/createMessageContent.ts @@ -89,15 +89,15 @@ export function createMessageContent( const htmlPrefix = isReply ? getHtmlReplyFallback(editedEvent) : ''; content.formatted_body = isEditing ? `${htmlPrefix} * ${formattedBody}` : formattedBody; + } - if (isEditing) { - content['m.new_content'] = { - "msgtype": content.msgtype, - "body": body, - "format": "org.matrix.custom.html", - 'formatted_body': formattedBody, - }; - } + if (isEditing) { + content['m.new_content'] = { + "msgtype": content.msgtype, + "body": body, + "format": "org.matrix.custom.html", + 'formatted_body': formattedBody, + }; } const newRelation = isEditing ?