mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
add testpolicy fixture
This commit is contained in:
parent
4ca16856b7
commit
911c4f651c
1 changed files with 9 additions and 0 deletions
9
fixtures/policy.ts
Normal file
9
fixtures/policy.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { NostrEvent, NostrRelayInfo, NostrRelayOK, NPolicy } from '@nostrify/types';
|
||||
import { HashtagPolicy } from '@nostrify/policies';
|
||||
|
||||
export default class TestPolicy implements NPolicy {
|
||||
call(event: NostrEvent): Promise<NostrRelayOK> {
|
||||
return new HashtagPolicy(['porn']).call(event);
|
||||
}
|
||||
info?: NostrRelayInfo | undefined;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue