re-encrypt the mailbox field when changing a pad password

This commit is contained in:
yflory
2019-09-09 14:13:27 +02:00
parent 0a5bf7a5c2
commit bb0365622b
3 changed files with 58 additions and 19 deletions

View File

@@ -77,7 +77,12 @@ proxy.mailboxes = {
};
// Send a message to someone else
var sendTo = Mailbox.sendTo = function (ctx, type, msg, user, cb) {
var sendTo = Mailbox.sendTo = function (ctx, type, msg, user, _cb) {
var cb = _cb || function (obj) {
if (obj && obj.error) {
console.error(obj.error);
}
};
if (!Crypto.Mailbox) {
return void cb({error: "chainpad-crypto is outdated and doesn't support mailboxes."});
}