Return th timestamp in mailbox history
This commit is contained in:
parent
d57d5962f4
commit
2e8e6e6de2
@ -339,6 +339,7 @@ proxy.mailboxes = {
|
|||||||
if (!req) { return; }
|
if (!req) { return; }
|
||||||
|
|
||||||
if (type === 'HISTORY_RANGE') {
|
if (type === 'HISTORY_RANGE') {
|
||||||
|
if (!Array.isArray(_msg)) { return; }
|
||||||
var message;
|
var message;
|
||||||
try {
|
try {
|
||||||
var decrypted = box.encryptor.decrypt(_msg[4]);
|
var decrypted = box.encryptor.decrypt(_msg[4]);
|
||||||
@ -348,6 +349,7 @@ proxy.mailboxes = {
|
|||||||
}
|
}
|
||||||
ctx.emit('HISTORY', {
|
ctx.emit('HISTORY', {
|
||||||
txid: txid,
|
txid: txid,
|
||||||
|
time: _msg[5],
|
||||||
message: message,
|
message: message,
|
||||||
hash: _msg[4].slice(0,64)
|
hash: _msg[4].slice(0,64)
|
||||||
}, [req.cId]);
|
}, [req.cId]);
|
||||||
@ -375,7 +377,7 @@ proxy.mailboxes = {
|
|||||||
var network = ctx.store.network;
|
var network = ctx.store.network;
|
||||||
network.sendto(network.historyKeeper, JSON.stringify(msg)).then(function () {
|
network.sendto(network.historyKeeper, JSON.stringify(msg)).then(function () {
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
throw new Error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -199,6 +199,7 @@ define([
|
|||||||
type: type,
|
type: type,
|
||||||
content: {
|
content: {
|
||||||
msg: data.message,
|
msg: data.message,
|
||||||
|
time: data.time,
|
||||||
hash: data.hash
|
hash: data.hash
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user