From 5412d2a07b211a5c402cf101813894b297506556 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Fri, 5 Jul 2024 20:43:13 -0300 Subject: [PATCH] fix(EventsDB): also add a split only by '@' at symbol --- src/storages/EventsDB.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storages/EventsDB.ts b/src/storages/EventsDB.ts index c74fedb6..3ade7e2e 100644 --- a/src/storages/EventsDB.ts +++ b/src/storages/EventsDB.ts @@ -241,8 +241,9 @@ class EventsDB implements NStore { static buildUserSearchContent(event: NostrEvent): string { const { name, nip05 } = n.json().pipe(n.metadata()).catch({}).parse(event.content); const nip05splitted = nip05 ? nip05.split(/[_@.]/) : []; + const nip05splitted2 = nip05 ? nip05.split(/[@]/) : []; - return [name, nip05, ...nip05splitted].filter(Boolean).join('\n'); + return [name, nip05, ...nip05splitted, ...nip05splitted2].filter(Boolean).join('\n'); } /** Build search content from tag values. */