add policyMode setting

This commit is contained in:
Siddharth Singh 2025-03-30 13:31:58 +05:30
parent 7cb643d1e4
commit b0036a3d28
No known key found for this signature in database

View file

@ -368,9 +368,8 @@ 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";
get policyMode(): "script" | "event" {
return this.env.get("DITTO_CUSTOM_POLICY") ? "script" : "event";
}
/** Absolute path to the data directory used by Ditto. */