|
|
@ -268,6 +268,7 @@ define([
|
|
|
|
var messages = obj.messages;
|
|
|
|
var messages = obj.messages;
|
|
|
|
if (!messages.length) { return void cb(); }
|
|
|
|
if (!messages.length) { return void cb(); }
|
|
|
|
if (obj.lastKnownHash !== answer.hash) { return void cb(); }
|
|
|
|
if (obj.lastKnownHash !== answer.hash) { return void cb(); }
|
|
|
|
|
|
|
|
try {
|
|
|
|
var res = Utils.Crypto.Mailbox.openOwnSecretLetter(messages[0].msg, {
|
|
|
|
var res = Utils.Crypto.Mailbox.openOwnSecretLetter(messages[0].msg, {
|
|
|
|
validateKey: data.validateKey,
|
|
|
|
validateKey: data.validateKey,
|
|
|
|
ephemeral_private: Nacl.util.decodeBase64(answer.curvePrivate),
|
|
|
|
ephemeral_private: Nacl.util.decodeBase64(answer.curvePrivate),
|
|
|
@ -278,6 +279,9 @@ define([
|
|
|
|
parsed._isAnon = answer.anonymous;
|
|
|
|
parsed._isAnon = answer.anonymous;
|
|
|
|
parsed._time = messages[0].time;
|
|
|
|
parsed._time = messages[0].time;
|
|
|
|
cb(parsed);
|
|
|
|
cb(parsed);
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
cb({error: e});
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|