From 40fb7f726f13f32dd9580b3808145e9217d4b897 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Tue, 13 Nov 2018 12:34:31 +1100 Subject: [PATCH] Fixed incorrect variable used. --- js/modules/data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/modules/data.js b/js/modules/data.js index 17730e1d9..feff9d463 100644 --- a/js/modules/data.js +++ b/js/modules/data.js @@ -455,7 +455,7 @@ async function getContactPreKeyByIdentityKey(key) { } async function getContactPreKeys(keyId, identityKeyString) { const keys = await channels.getContactPreKeys(keyId, identityKeyString); - return keys.map(k => keysToArrayBuffer(PRE_KEY_KEYS, data)); + return keys.map(k => keysToArrayBuffer(PRE_KEY_KEYS, k)); } async function getAllContactPreKeys() { const keys = await channels.getAllContactPreKeys(); @@ -487,7 +487,7 @@ async function getContactSignedPreKeyByIdentityKey(key) { } async function getContactSignedPreKeys(keyId, identityKeyString) { const keys = await channels.getContactSignedPreKeys(keyId, identityKeyString); - return keys.map(k => keysToArrayBuffer(PRE_KEY_KEYS, data)); + return keys.map(k => keysToArrayBuffer(PRE_KEY_KEYS, k)); } async function bulkAddContactSignedPreKeys(array) { const updated = map(array, data => keysFromArrayBuffer(PRE_KEY_KEYS, data));