diff --git a/lib/encryption/encryption.dart b/lib/encryption/encryption.dart index 4470285..62c5a05 100644 --- a/lib/encryption/encryption.dart +++ b/lib/encryption/encryption.dart @@ -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.from(payload); final Map mRelatesTo = payload.remove('m.relates_to'); final payloadContent = { 'content': payload,