Merge pull request #3551 from maunium/fix-edit-reply-fallback

Fix reply fallback being included in edit m.new_content
pull/21833/head
Travis Ralston 2019-10-17 18:24:33 +02:00 committed by GitHub
commit 96db855e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ function createEditContent(model, editedEvent) {
const newContent = {
"msgtype": isEmote ? "m.emote" : "m.text",
"body": plainPrefix + body,
"body": body,
};
const contentBody = {
msgtype: newContent.msgtype,
@ -85,7 +85,7 @@ function createEditContent(model, editedEvent) {
const formattedBody = htmlSerializeIfNeeded(model, {forceHTML: isReply});
if (formattedBody) {
newContent.format = "org.matrix.custom.html";
newContent.formatted_body = htmlPrefix + formattedBody;
newContent.formatted_body = formattedBody;
contentBody.format = newContent.format;
contentBody.formatted_body = `${htmlPrefix} * ${formattedBody}`;
}