From 54536360fffeafc53ef2e8edaa011a8d90f559a8 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 15 Feb 2017 13:41:31 -0800 Subject: [PATCH] Return created_at and keyId with signed prekeys Use `.get()` rather than `attributes.property` access because created_at may not be present for old keys // FREEBIE --- js/signal_protocol_store.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/signal_protocol_store.js b/js/signal_protocol_store.js index 5042621ab5..2bf658c526 100644 --- a/js/signal_protocol_store.js +++ b/js/signal_protocol_store.js @@ -148,8 +148,10 @@ return new Promise(function(resolve) { prekey.fetch().then(function() { resolve({ - pubKey: prekey.attributes.publicKey, - privKey: prekey.attributes.privateKey + pubKey : prekey.get('publicKey'), + privKey : prekey.get('privateKey'), + created_at : prekey.get('created_at'), + keyId : prekey.get('id') }); }).fail(resolve); });