Fix Drive history

pull/1/head
yflory 6 years ago
parent 8b20b14184
commit 2be78deb93

@ -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({

@ -102,7 +102,8 @@ define([
noHash: true, noHash: true,
noRealtime: true, noRealtime: true,
driveEvents: true, driveEvents: true,
addRpc: addRpc addRpc: addRpc,
isDrive: true,
}); });
}); });
}); });

Loading…
Cancel
Save