aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoland Pallai <dap78@magex.hu>2021-01-28 15:05:33 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-01-28 17:04:42 +0100
commit221cc9faf713eb383a0e76a56018794796690369 (patch)
treefb9a2172bb4600298d856d9c68980bc54ca5b99c /lib
parentb069c6bb377641840026aa37cb8acf7e2a76bfe5 (diff)
downloadlibquotient-221cc9faf713eb383a0e76a56018794796690369.tar.gz
libquotient-221cc9faf713eb383a0e76a56018794796690369.zip
Fix rich edits (transmit)
The new formatted_body was not included into new content on edit due to badly constructed json. (cherry picked from commit df6b2d31ec8f2f5890826719e960f450a4968f22)
Diffstat (limited to 'lib')
-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 e2465e61..e68e7d63 100644
--- a/lib/events/roommessageevent.cpp
+++ b/lib/events/roommessageevent.cpp
@@ -345,8 +345,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);
}