Add owners to invitation channels

pull/1/head
yflory 5 years ago
parent 32fd1b4971
commit 97f322753a

@ -1279,6 +1279,8 @@ define([
var seeds = data.seeds; // {scrypt, preview}
var bytes64 = data.bytes64;
if (!teamId || !team) { return void cb({error: 'EINVAL'}); }
var roster = team.roster;
var teamName;
@ -1311,12 +1313,16 @@ define([
var putOpts = {
initialState: '{}',
network: ctx.store.network,
metadata: {
owners: [ctx.store.proxy.edPublic, ephemeralKeys.edPublic]
}
};
(function () {
// a random signing keypair to prevent further writes to the channel
// we don't need to remember it cause we're only writing once
var sign = Invite.generateSignPair(); // { validateKey, signKey}
putOpts.metadata.validateKey = sign.validateKey;
// visible with only the invite link
var previewContent = {
@ -1324,7 +1330,6 @@ define([
message: message,
author: Messaging.createData(ctx.store.proxy, false),
displayName: name,
curvePublic: ephemeralKeys.curvePublic,
};
var cryptput_config = {
@ -1351,6 +1356,7 @@ define([
// a different random signing key so that the server can't correlate these documents
// as components of an invite
var sign = Invite.generateSignPair(); // { validateKey, signKey}
putOpts.metadata.validateKey = sign.validateKey;
// available only with the link and the content
var inviteContent = {

Loading…
Cancel
Save