Shared folder history

This commit is contained in:
yflory
2019-06-17 14:13:06 +02:00
parent ba877ba459
commit 04d8578f4e
6 changed files with 72 additions and 4 deletions

View File

@@ -85,6 +85,20 @@ define([
cb({});
};
Store.restoreSharedFolder = function (clientId, data, cb) {
if (!data.sfId || !data.drive) { return void cb({error:'EINVAL'}); }
if (store.sharedFolders[data.sfId]) {
Object.keys(data.drive).forEach(function (k) {
store.sharedFolders[data.sfId].proxy[k] = data.drive[k];
});
Object.keys(store.sharedFolders[data.sfId].proxy).forEach(function (k) {
if (data.drive[k]) { return; }
delete store.sharedFolders[data.sfId].proxy[k];
});
}
onSync(cb);
};
Store.hasSigningKeys = function () {
if (!store.proxy) { return; }
return typeof(store.proxy.edPrivate) === 'string' &&