Add author and time of patches in debug app
parent
b7b2685f14
commit
1d24c85ca4
|
@ -1969,7 +1969,11 @@ define([
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
msg = msg.replace(/cp\|(([A-Za-z0-9+\/=]+)\|)?/, '');
|
msg = msg.replace(/cp\|(([A-Za-z0-9+\/=]+)\|)?/, '');
|
||||||
msgs.push(msg);
|
msgs.push({
|
||||||
|
msg: msg,
|
||||||
|
author: parsed[2][1],
|
||||||
|
time: parsed[2][5]
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,11 @@ define([
|
||||||
if (!Array.isArray(data.messages)) { return void console.error('Not an array!'); }
|
if (!Array.isArray(data.messages)) { return void console.error('Not an array!'); }
|
||||||
lastKnownHash = data.lastKnownHash;
|
lastKnownHash = data.lastKnownHash;
|
||||||
isComplete = data.isFull;
|
isComplete = data.isFull;
|
||||||
Array.prototype.unshift.apply(allMessages, data.messages); // Destructive concat
|
var messages = (data.messages || []).map(function (obj) {
|
||||||
|
return obj.msg;
|
||||||
|
});
|
||||||
|
if (config.debug) { console.log(data.messages); }
|
||||||
|
Array.prototype.unshift.apply(allMessages, messages); // Destructive concat
|
||||||
fillChainPad(realtime, allMessages);
|
fillChainPad(realtime, allMessages);
|
||||||
cb (null, realtime, data.isFull);
|
cb (null, realtime, data.isFull);
|
||||||
});
|
});
|
||||||
|
|
|
@ -859,10 +859,14 @@ define([
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
cb({
|
cb({
|
||||||
isFull: data.isFull,
|
isFull: data.isFull,
|
||||||
messages: data.messages.map(function (msg) {
|
messages: data.messages.map(function (obj) {
|
||||||
// The 3rd parameter "true" means we're going to skip signature validation.
|
// The 3rd parameter "true" means we're going to skip signature validation.
|
||||||
// We don't need it since the message is already validated serverside by hk
|
// We don't need it since the message is already validated serverside by hk
|
||||||
return crypto.decrypt(msg, true, true);
|
return {
|
||||||
|
msg: crypto.decrypt(obj.msg, true, true),
|
||||||
|
author: obj.author,
|
||||||
|
time: obj.time
|
||||||
|
};
|
||||||
}),
|
}),
|
||||||
lastKnownHash: data.lastKnownHash
|
lastKnownHash: data.lastKnownHash
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue