From 074907312091bbd7509c24138fb917ef406b47d5 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 5 Nov 2021 20:52:50 +0100 Subject: [PATCH] clone key as olm clears it --- src/matrix/e2ee/Dehydration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/e2ee/Dehydration.js b/src/matrix/e2ee/Dehydration.js index 65e2b90a..461e6c42 100644 --- a/src/matrix/e2ee/Dehydration.js +++ b/src/matrix/e2ee/Dehydration.js @@ -36,7 +36,7 @@ export async function uploadAccountAsDehydratedDevice(account, hsApi, key, devic const response = await hsApi.createDehydratedDevice({ device_data: { algorithm: DEHYDRATION_LIBOLM_PICKLE_ALGORITHM, - account: account.pickleWithKey(key.binaryKey), + account: account.pickleWithKey(key.binaryKey.slice()), passphrase: key.description?.passphraseParams || {}, }, initial_device_display_name: deviceDisplayName