From 911c4f651c040a16dfe59d1dfeb328fd8e401112 Mon Sep 17 00:00:00 2001 From: Siddharth Singh Date: Thu, 3 Apr 2025 19:02:58 +0530 Subject: [PATCH] add testpolicy fixture --- fixtures/policy.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 fixtures/policy.ts diff --git a/fixtures/policy.ts b/fixtures/policy.ts new file mode 100644 index 00000000..e44c0924 --- /dev/null +++ b/fixtures/policy.ts @@ -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 { + return new HashtagPolicy(['porn']).call(event); + } + info?: NostrRelayInfo | undefined; +}