|
|
@ -421,10 +421,19 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
sframeChan.on('Q_GET_HISTORY_RANGE', function (data, cb) {
|
|
|
|
sframeChan.on('Q_GET_HISTORY_RANGE', function (data, cb) {
|
|
|
|
var crypto = Crypto.createEncryptor(secret.keys);
|
|
|
|
var nSecret = secret;
|
|
|
|
|
|
|
|
if (cfg.isDrive) {
|
|
|
|
|
|
|
|
var hash = Utils.LocalStore.getUserHash() || Utils.LocalStore.getFSHash();
|
|
|
|
|
|
|
|
if (hash) {
|
|
|
|
|
|
|
|
nSecret = Utils.Hash.getSecrets('drive', hash);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var channel = nSecret.channel;
|
|
|
|
|
|
|
|
var validate = nSecret.keys.validateKey;
|
|
|
|
|
|
|
|
var crypto = Crypto.createEncryptor(nSecret.keys);
|
|
|
|
Cryptpad.getHistoryRange({
|
|
|
|
Cryptpad.getHistoryRange({
|
|
|
|
channel: secret.channel,
|
|
|
|
channel: channel,
|
|
|
|
validateKey: secret.keys.validateKey,
|
|
|
|
validateKey: validate,
|
|
|
|
lastKnownHash: data.lastKnownHash
|
|
|
|
lastKnownHash: data.lastKnownHash
|
|
|
|
}, function (data) {
|
|
|
|
}, function (data) {
|
|
|
|
cb({
|
|
|
|
cb({
|
|
|
|