diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-01-28 16:50:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-28 16:50:49 +0100 |
commit | 6da63e11a2c8c9cc7d9e6fff0293d5e973071af0 (patch) | |
tree | e7bc1a48e214536bcdc7d860f084d30afabeb179 /lib/events | |
parent | cf661d5e85441f849c0e0faca1c929810d4fd752 (diff) | |
parent | b850edadde2299b122a5cd17da85e943430e43b7 (diff) | |
download | libquotient-6da63e11a2c8c9cc7d9e6fff0293d5e973071af0.tar.gz libquotient-6da63e11a2c8c9cc7d9e6fff0293d5e973071af0.zip |
Merge pull request #448 from rpallai/richreplyfix
Fix rich replies json format (transmit)
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/roommessageevent.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/events/roommessageevent.cpp b/lib/events/roommessageevent.cpp index 14824277..3fccb380 100644 --- a/lib/events/roommessageevent.cpp +++ b/lib/events/roommessageevent.cpp @@ -325,7 +325,10 @@ void TextContent::fillJson(QJsonObject* json) const } if (relatesTo) { json->insert(QStringLiteral("m.relates_to"), - QJsonObject { { "rel_type", relatesTo->type }, { EventIdKey, relatesTo->eventId } }); + relatesTo->type == RelatesTo::ReplyTypeId() ? + QJsonObject { { relatesTo->type, QJsonObject{ { EventIdKey, relatesTo->eventId } } } } : + QJsonObject { { "rel_type", relatesTo->type }, { EventIdKey, relatesTo->eventId } } + ); if (relatesTo->type == RelatesTo::ReplacementTypeId()) { QJsonObject newContentJson; if (mimeType.inherits("text/html")) { |