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