@musnows/scriverse 0.6.10 → 0.6.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js CHANGED
@@ -654,6 +654,9 @@ function redactTaskCharacterNames(record, permissions) {
654
654
  const { targetCharacters: _targetCharacters, ...redactedScope } = scope;
655
655
  result.scope = redactedScope;
656
656
  }
657
+ const scopeTarget = recordValue(result.scopeTarget);
658
+ if (scopeTarget?.type === "character")
659
+ delete result.scopeTarget;
657
660
  const taskResult = recordValue(result.result);
658
661
  if (taskResult) {
659
662
  const redactedTaskResult = { ...taskResult };
@@ -679,6 +682,11 @@ function redactTaskCharacterNames(record, permissions) {
679
682
  result.result = redactedTaskResult;
680
683
  }
681
684
  }
685
+ if (proseRestricted) {
686
+ const scopeTarget = recordValue(result.scopeTarget);
687
+ if (scopeTarget?.type === "chapter")
688
+ delete result.scopeTarget;
689
+ }
682
690
  if (permissions.relationships === "none") {
683
691
  const taskResult = recordValue(result.result);
684
692
  const changePreview = recordValue(taskResult?.relationshipChangePreview);