Return th timestamp in mailbox history

pull/1/head
yflory 5 years ago
parent d57d5962f4
commit 2e8e6e6de2

@ -339,6 +339,7 @@ proxy.mailboxes = {
if (!req) { return; }
if (type === 'HISTORY_RANGE') {
if (!Array.isArray(_msg)) { return; }
var message;
try {
var decrypted = box.encryptor.decrypt(_msg[4]);
@ -348,6 +349,7 @@ proxy.mailboxes = {
}
ctx.emit('HISTORY', {
txid: txid,
time: _msg[5],
message: message,
hash: _msg[4].slice(0,64)
}, [req.cId]);
@ -375,7 +377,7 @@ proxy.mailboxes = {
var network = ctx.store.network;
network.sendto(network.historyKeeper, JSON.stringify(msg)).then(function () {
}, function (err) {
throw new Error(err);
console.error(err);
});
};

@ -199,6 +199,7 @@ define([
type: type,
content: {
msg: data.message,
time: data.time,
hash: data.hash
}
});

Loading…
Cancel
Save