Unified metadata
This commit is contained in:
@@ -422,8 +422,10 @@ define([
|
||||
|
||||
var friend = getFriendFromChannel(chan.id) || {};
|
||||
var cfg = {
|
||||
validateKey: keys ? keys.validateKey : undefined,
|
||||
owners: [proxy.edPublic, friend.edPublic],
|
||||
metadata: {
|
||||
validateKey: keys ? keys.validateKey : undefined,
|
||||
owners: [proxy.edPublic, friend.edPublic],
|
||||
},
|
||||
lastKnownHash: data.lastKnownHash
|
||||
};
|
||||
var msg = ['GET_HISTORY', chan.id, cfg];
|
||||
|
||||
@@ -1191,10 +1191,7 @@ define([
|
||||
},
|
||||
noChainPad: true,
|
||||
channel: data.channel,
|
||||
validateKey: data.validateKey,
|
||||
owners: data.owners,
|
||||
password: data.password,
|
||||
expire: data.expire,
|
||||
metadata: data.metadata,
|
||||
network: store.network,
|
||||
//readOnly: data.readOnly,
|
||||
onConnect: function (wc, sendMessage) {
|
||||
@@ -1441,14 +1438,16 @@ define([
|
||||
websocketURL: NetConfig.getWebsocketURL(),
|
||||
channel: secret.channel,
|
||||
readOnly: false,
|
||||
validateKey: secret.keys.validateKey || undefined,
|
||||
crypto: Crypto.createEncryptor(secret.keys),
|
||||
userName: 'sharedFolder',
|
||||
logLevel: 1,
|
||||
ChainPad: ChainPad,
|
||||
classic: true,
|
||||
network: store.network,
|
||||
owners: owners
|
||||
metadata: {
|
||||
validateKey: secret.keys.validateKey || undefined,
|
||||
owners: owners
|
||||
}
|
||||
};
|
||||
var rt = Listmap.create(listmapConfig);
|
||||
store.sharedFolders[id] = rt;
|
||||
|
||||
@@ -92,9 +92,11 @@ define([
|
||||
var hk = network.historyKeeper;
|
||||
var cfg = {
|
||||
validateKey: obj.validateKey,
|
||||
lastKnownHash: chan.lastKnownHash || chan.lastCpHash,
|
||||
owners: obj.owners,
|
||||
expire: obj.expire
|
||||
metadata: {
|
||||
lastKnownHash: chan.lastKnownHash || chan.lastCpHash,
|
||||
owners: obj.owners,
|
||||
expire: obj.expire
|
||||
}
|
||||
};
|
||||
var msg = ['GET_HISTORY', wc.id, cfg];
|
||||
// Add the validateKey if we are the channel creator and we have a validateKey
|
||||
|
||||
@@ -23,14 +23,12 @@ define([], function () {
|
||||
var start = function (conf) {
|
||||
var channel = conf.channel;
|
||||
var Crypto = conf.crypto;
|
||||
var validateKey = conf.validateKey;
|
||||
var isNewHash = conf.isNewHash;
|
||||
var readOnly = conf.readOnly || false;
|
||||
var padRpc = conf.padRpc;
|
||||
var sframeChan = conf.sframeChan;
|
||||
var password = conf.password;
|
||||
var owners = conf.owners;
|
||||
var expire = conf.expire;
|
||||
var metadata= conf.metadata || {};
|
||||
var validateKey = metadata.validateKey;
|
||||
var onConnect = conf.onConnect || function () { };
|
||||
conf = undefined;
|
||||
|
||||
@@ -127,11 +125,8 @@ define([], function () {
|
||||
// join the netflux network, promise to handle opening of the channel
|
||||
padRpc.joinPad({
|
||||
channel: channel || null,
|
||||
validateKey: validateKey,
|
||||
readOnly: readOnly,
|
||||
owners: owners,
|
||||
password: password,
|
||||
expire: expire
|
||||
metadata: metadata
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1074,13 +1074,17 @@ define([
|
||||
readOnly = false;
|
||||
updateMeta();
|
||||
|
||||
var rtConfig = {};
|
||||
var rtConfig = {
|
||||
metadata: {}
|
||||
};
|
||||
if (data.owned) {
|
||||
rtConfig.owners = [edPublic];
|
||||
rtConfig.metadata.owners = [edPublic];
|
||||
}
|
||||
if (data.expire) {
|
||||
rtConfig.expire = data.expire;
|
||||
rtConfig.metadata.expire = data.expire;
|
||||
}
|
||||
rtConfig.metadata.validateKey = (secret.keys && secret.keys.validateKey) || undefined;
|
||||
|
||||
Utils.rtConfig = rtConfig;
|
||||
nThen(function(waitFor) {
|
||||
if (data.templateId) {
|
||||
|
||||
Reference in New Issue
Block a user