mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-23 08:14:25 +01:00
Uppercase CustomPolicy
This commit is contained in:
@@ -61,8 +61,8 @@ async function policyFilter(event: NostrEvent): Promise<void> {
|
|||||||
];
|
];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const customPolicy = (await import('../data/policy.ts')).default;
|
const CustomPolicy = (await import('../data/policy.ts')).default;
|
||||||
policies.push(new customPolicy());
|
policies.push(new CustomPolicy());
|
||||||
} catch (_e) {
|
} catch (_e) {
|
||||||
debug('policy not found - https://docs.soapbox.pub/ditto/policies/');
|
debug('policy not found - https://docs.soapbox.pub/ditto/policies/');
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,6 @@ async function policyFilter(event: NostrEvent): Promise<void> {
|
|||||||
|
|
||||||
const result = await policy.call(event);
|
const result = await policy.call(event);
|
||||||
debug(JSON.stringify(result));
|
debug(JSON.stringify(result));
|
||||||
|
|
||||||
RelayError.assert(result);
|
RelayError.assert(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user