diff --git a/server/runner/memopayload/runner.go b/server/runner/memopayload/runner.go index a746e648..66756878 100644 --- a/server/runner/memopayload/runner.go +++ b/server/runner/memopayload/runner.go @@ -56,6 +56,7 @@ func RebuildMemoPayload(memo *store.Memo) error { memo.Payload = &storepb.MemoPayload{} } tags := []string{} + references := []string{} property := &storepb.MemoPayload_Property{} TraverseASTNodes(nodes, func(node ast.Node) { switch n := node.(type) { @@ -73,9 +74,13 @@ func RebuildMemoPayload(memo *store.Memo) error { } case *ast.Code, *ast.CodeBlock: property.HasCode = true + case *ast.EmbeddedContent: + // TODO: validate references. + references = append(references, n.ResourceName) } }) memo.Payload.Tags = tags + memo.Payload.References = references memo.Payload.Property = property return nil }