diff --git a/packages/conf/DittoConf.ts b/packages/conf/DittoConf.ts index 59a3fde4..c48619f9 100644 --- a/packages/conf/DittoConf.ts +++ b/packages/conf/DittoConf.ts @@ -368,6 +368,11 @@ export class DittoConf { return this.env.get('DITTO_POLICY') || path.join(this.dataDir, 'policy.ts'); } + get policyMode(): string { + if (Deno.env.get("DITTO_CUSTOM_POLICY") === "1") return "script"; + return "event"; + } + /** Absolute path to the data directory used by Ditto. */ get dataDir(): string { return this.env.get('DITTO_DATA_DIR') || path.join(Deno.cwd(), 'data');