Unhack validateKey for the history mode

pull/1/head
yflory 8 years ago
parent 90cc3e6a5e
commit c1d2fa6b52

@ -100,8 +100,6 @@ Version 1
var ret = {}; var ret = {};
if (typeof href !== "string") { console.error(href); }
if (!href) { return ret; } if (!href) { return ret; }
if (href.slice(-1) !== '/') { href += '/'; } if (href.slice(-1) !== '/') { href += '/'; }

@ -44,7 +44,6 @@ define([
History.readOnly = 2; History.readOnly = 2;
} }
else if (!secret.keys.validateKey) { else if (!secret.keys.validateKey) {
secret.keys.validateKey = true;
History.readOnly = 0; History.readOnly = 0;
} }
@ -70,6 +69,10 @@ define([
return; return;
} }
if (parsed[0] !== 'FULL_HISTORY') { return; } if (parsed[0] !== 'FULL_HISTORY') { return; }
if (parsed[1] && parsed[1].validateKey) { // First message
secret.keys.validateKey = parsed[1].validateKey;
return;
}
msg = parsed[1][4]; msg = parsed[1][4];
if (msg) { if (msg) {
msg = msg.replace(/^cp\|/, ''); msg = msg.replace(/^cp\|/, '');

Loading…
Cancel
Save