diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-06-20 19:26:54 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-06-20 19:26:54 +0200 |
commit | c973fd759b4aab6a6d2bcd892f78239057ffc7fb (patch) | |
tree | 6e9e246442cc294ae2852a2c0acdcabdee2bb678 /src/Olm.cpp | |
parent | Try to make text rendering in qml sharper (diff) | |
download | nheko-c973fd759b4aab6a6d2bcd892f78239057ffc7fb.tar.xz |
Fix m.relates_to being sent as 'null' when not set in encrypted messages.
Thank you Sorunome for reporting.
Diffstat (limited to 'src/Olm.cpp')
-rw-r--r-- | src/Olm.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Olm.cpp b/src/Olm.cpp index 2c4f6186..994a3a67 100644 --- a/src/Olm.cpp +++ b/src/Olm.cpp @@ -168,7 +168,8 @@ encrypt_group_message(const std::string &room_id, const std::string &device_id, // relations shouldn't be encrypted... mtx::common::ReplyRelatesTo relation; - if (body["content"]["m.relates_to"].contains("m.in_reply_to")) { + if (body["content"].contains("m.relates_to") && + body["content"]["m.relates_to"].contains("m.in_reply_to")) { relation = body["content"]["m.relates_to"]; body["content"].erase("m.relates_to"); } |