mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Fix m.relates_to being sent as 'null' when not set in encrypted messages.
Thank you Sorunome for reporting.
This commit is contained in:
parent
cded494cb5
commit
c973fd759b
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue