mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
add policyMode setting
This commit is contained in:
parent
28de904e8f
commit
dc9e45f133
1 changed files with 5 additions and 0 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue