rewrite trimmed history WITH newlines
This commit is contained in:
parent
5808c534b5
commit
3741cbcbc0
@ -140,7 +140,6 @@ const AUTHENTICATED_USER_SCOPED = {
|
|||||||
var handleAuthenticatedMessage = function (Env, map) {
|
var handleAuthenticatedMessage = function (Env, map) {
|
||||||
var msg = map.msg;
|
var msg = map.msg;
|
||||||
var safeKey = map.safeKey;
|
var safeKey = map.safeKey;
|
||||||
var publicKey = map.publicKey;
|
|
||||||
var Respond = map.Respond;
|
var Respond = map.Respond;
|
||||||
var Server = map.Server;
|
var Server = map.Server;
|
||||||
|
|
||||||
@ -278,7 +277,6 @@ var rpc = function (Env, Server, data, respond) {
|
|||||||
handleAuthenticatedMessage(Env, {
|
handleAuthenticatedMessage(Env, {
|
||||||
msg: msg,
|
msg: msg,
|
||||||
safeKey: safeKey,
|
safeKey: safeKey,
|
||||||
publicKey: publicKey,
|
|
||||||
Respond: Respond,
|
Respond: Respond,
|
||||||
Server: Server,
|
Server: Server,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -959,17 +959,17 @@ var trimChannel = function (env, channelName, hash, _cb) {
|
|||||||
return readMore();
|
return readMore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var s_msg = msgObj.buff.toString('utf8');
|
||||||
if (retain) {
|
if (retain) {
|
||||||
// if this flag is set then you've already found
|
// if this flag is set then you've already found
|
||||||
// the message you were looking for.
|
// the message you were looking for.
|
||||||
// write it to your temp buffer and keep going
|
// write it to your temp buffer and keep going
|
||||||
return void tempStream.write(msgObj.buff, function () {
|
return void tempStream.write(s_msg + '\n', function () {
|
||||||
readMore();
|
readMore();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var msg = Util.tryParse(msgObj.buff.toString('utf8'));
|
var msg = Util.tryParse(s_msg);
|
||||||
|
|
||||||
var msgHash = Extras.getHash(msg[4]);
|
var msgHash = Extras.getHash(msg[4]);
|
||||||
|
|
||||||
if (msgHash === hash) {
|
if (msgHash === hash) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user