Prevent m.relates_to to be removed from the status=1 object in encrypted rooms

This commit is contained in:
Sorunome 2020-07-29 11:43:27 +02:00
parent a28ab5fc60
commit 6915781e6a
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
1 changed files with 3 additions and 0 deletions

View File

@ -267,6 +267,9 @@ class Encryption {
if (sess == null) {
throw ('Unable to create new outbound group session');
}
// we clone the payload as we do not want to remove 'm.relates_to' from the
// original payload passed into this function
payload = Map<String, dynamic>.from(payload);
final Map<String, dynamic> mRelatesTo = payload.remove('m.relates_to');
final payloadContent = {
'content': payload,