|
|
@ -231,7 +231,8 @@
|
|
|
|
window.log.info('Successfully fetched contact prekey:', pubKey);
|
|
|
|
window.log.info('Successfully fetched contact prekey:', pubKey);
|
|
|
|
resolve({
|
|
|
|
resolve({
|
|
|
|
keyId: prekey.get('keyId'),
|
|
|
|
keyId: prekey.get('keyId'),
|
|
|
|
publicKey: prekey.get('publicKey')
|
|
|
|
publicKey: prekey.get('publicKey'),
|
|
|
|
|
|
|
|
identityKey: prekey.get('identityKey'),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
() => {
|
|
|
|
() => {
|
|
|
@ -243,7 +244,8 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
storeContactPreKey(pubKey, preKey) {
|
|
|
|
storeContactPreKey(pubKey, preKey) {
|
|
|
|
const prekey = new ContactPreKey({
|
|
|
|
const prekey = new ContactPreKey({
|
|
|
|
id: pubKey,
|
|
|
|
// id: (autoincrement)
|
|
|
|
|
|
|
|
publicKeyString: pubKey,
|
|
|
|
publicKey: preKey.publicKey,
|
|
|
|
publicKey: preKey.publicKey,
|
|
|
|
keyId: preKey.keyId,
|
|
|
|
keyId: preKey.keyId,
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -328,6 +330,8 @@
|
|
|
|
prekey.get('id')
|
|
|
|
prekey.get('id')
|
|
|
|
);
|
|
|
|
);
|
|
|
|
resolve({
|
|
|
|
resolve({
|
|
|
|
|
|
|
|
id: preKey.get('id'),
|
|
|
|
|
|
|
|
publicKeyString: preKey.get('publicKeyString'),
|
|
|
|
publicKey: prekey.get('publicKey'),
|
|
|
|
publicKey: prekey.get('publicKey'),
|
|
|
|
signature: prekey.get('signature'),
|
|
|
|
signature: prekey.get('signature'),
|
|
|
|
created_at: prekey.get('created_at'),
|
|
|
|
created_at: prekey.get('created_at'),
|
|
|
@ -378,7 +382,8 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
storeContactSignedPreKey(pubKey, signedPreKey) {
|
|
|
|
storeContactSignedPreKey(pubKey, signedPreKey) {
|
|
|
|
const prekey = new ContactSignedPreKey({
|
|
|
|
const prekey = new ContactSignedPreKey({
|
|
|
|
id: pubKey,
|
|
|
|
// id: (autoincrement)
|
|
|
|
|
|
|
|
publicKeyString: pubKey,
|
|
|
|
keyId: signedPreKey.keyId,
|
|
|
|
keyId: signedPreKey.keyId,
|
|
|
|
publicKey: signedPreKey.publicKey,
|
|
|
|
publicKey: signedPreKey.publicKey,
|
|
|
|
signature: signedPreKey.signature,
|
|
|
|
signature: signedPreKey.signature,
|
|
|
|