diff options
author | bobzel <zzzman@gmail.com> | 2023-07-07 13:36:21 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-07-07 13:36:21 -0400 |
commit | fa38dbe06d6ddb5f4499b759459a24d2b3c111e8 (patch) | |
tree | 64020a79fcc4eedf77d2bddfd2c1cb048ed077d9 /src/fields/Doc.ts | |
parent | 53fe9a1e2503d8112ddb2f2101f46d5a2e23c791 (diff) |
a bunch of fixes to simplify collaboration and make it work better.
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 9c138d348..28fbdc192 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -481,7 +481,7 @@ export namespace Doc { doc.embedContainer = container; if (Doc.GetProto(container).author === doc.author) { Object.keys(Doc.GetProto(container)) - .filter(key => key.startsWith('acl')) + .filter(key => key.startsWith('acl') && !key.includes(Doc.CurrentUserEmailNormalized)) .forEach(key => (doc[key] = Doc.GetProto(container)[key])); } } @@ -696,7 +696,7 @@ export namespace Doc { Doc.SetLayout(embedding, Doc.MakeEmbedding(layout)); } embedding.createdFrom = doc; - embedding.proto_embeddingId = Doc.GetProto(doc).proto_embeddingId = NumCast(Doc.GetProto(doc).proto_embeddingId) + 1; + embedding.proto_embeddingId = Doc.GetProto(doc).proto_embeddingId = DocListCast(Doc.GetProto(doc).proto_embeddings).length + 1; embedding.title = ComputedField.MakeFunction(`renameEmbedding(this)`); embedding.author = Doc.CurrentUserEmail; |