mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
only log custom policy path if we're actually using a script to load the policy
This commit is contained in:
parent
7715d53ad5
commit
70dba0c66b
1 changed files with 10 additions and 8 deletions
|
|
@ -53,15 +53,17 @@ export class PolicyWorker implements NPolicy {
|
||||||
path: conf.policy,
|
path: conf.policy,
|
||||||
databaseUrl: conf.databaseUrl,
|
databaseUrl: conf.databaseUrl,
|
||||||
pubkey: await conf.signer.getPublicKey(),
|
pubkey: await conf.signer.getPublicKey(),
|
||||||
|
mode: conf.policyMode
|
||||||
});
|
});
|
||||||
|
if (conf.policyMode === "script") {
|
||||||
logi({
|
logi({
|
||||||
level: 'info',
|
level: 'info',
|
||||||
ns: 'ditto.system.policy',
|
ns: 'ditto.system.policy',
|
||||||
msg: 'Using custom policy',
|
msg: 'Using custom policy',
|
||||||
path: conf.policy,
|
path: conf.policy,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof Error && e.message.includes('Module not found')) {
|
if (e instanceof Error && e.message.includes('Module not found')) {
|
||||||
logi({
|
logi({
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue