aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
authorRoland Pallai <dap78@magex.hu>2021-01-28 15:05:33 +0100
committerRoland Pallai <dap78@magex.hu>2021-01-28 15:41:51 +0100
commitdf6b2d31ec8f2f5890826719e960f450a4968f22 (patch)
tree8fc67b6c37c483b02df876a438f9f21977cc0f89 /lib/events
parentba1d3bda99c04f8783d1a5266f0fa7700ef3eb18 (diff)
downloadlibquotient-df6b2d31ec8f2f5890826719e960f450a4968f22.tar.gz
libquotient-df6b2d31ec8f2f5890826719e960f450a4968f22.zip
Fix rich edits (transmit)
The new formatted_body was not included into new content on edit due to badly constructed json.
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/roommessageevent.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/events/roommessageevent.cpp b/lib/events/roommessageevent.cpp
index 14824277..4a733772 100644
--- a/lib/events/roommessageevent.cpp
+++ b/lib/events/roommessageevent.cpp
@@ -329,8 +329,8 @@ void TextContent::fillJson(QJsonObject* json) const
if (relatesTo->type == RelatesTo::ReplacementTypeId()) {
QJsonObject newContentJson;
if (mimeType.inherits("text/html")) {
- json->insert(FormatKey, HtmlContentTypeId);
- json->insert(FormattedBodyKey, body);
+ newContentJson.insert(FormatKey, HtmlContentTypeId);
+ newContentJson.insert(FormattedBodyKey, body);
}
json->insert(QStringLiteral("m.new_content"), newContentJson);
}