Merge branch 'soru/no-reply-flickering' into 'master'

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

Closes app#529

See merge request famedly/famedlysdk!402
This commit is contained in:
Christian Pauly 2020-07-29 10:45:42 +00:00
commit 969467c497

View file

@ -267,6 +267,9 @@ class Encryption {
if (sess == null) { if (sess == null) {
throw ('Unable to create new outbound group session'); 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 Map<String, dynamic> mRelatesTo = payload.remove('m.relates_to');
final payloadContent = { final payloadContent = {
'content': payload, 'content': payload,