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
This commit is contained in:
lilia 2017-02-15 13:41:31 -08:00
parent 829d147d19
commit 54536360ff

View file

@ -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);
});