From 5c09034151ebe852d1a8cb680fb6944b5473e8cd Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 5 Jun 2024 14:39:48 -0500 Subject: [PATCH] EventsDB: index the n-tag --- src/storages/EventsDB.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storages/EventsDB.ts b/src/storages/EventsDB.ts index 960bcfe..20a0895 100644 --- a/src/storages/EventsDB.ts +++ b/src/storages/EventsDB.ts @@ -32,6 +32,7 @@ class EventsDB implements NStore { 'L': ({ event, count }) => event.kind === 1985 || count === 0, 'l': ({ event, count }) => event.kind === 1985 || count === 0, 'media': ({ count, value }) => (count < 4) && isURL(value), + 'n': ({ count, value }) => count < 50 && value.length < 50, 'P': ({ count, value }) => count === 0 && isNostrId(value), 'p': ({ event, count, value }) => (count < 15 || event.kind === 3) && isNostrId(value), 'proxy': ({ count, value }) => count === 0 && isURL(value),