mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-15 19:34:25 +01:00
feat(EventsDB): add nip05 split in buildUserSearchContent()
This commit is contained in:
@@ -240,7 +240,9 @@ class EventsDB implements NStore {
|
||||
/** Build search content for a user. */
|
||||
static buildUserSearchContent(event: NostrEvent): string {
|
||||
const { name, nip05 } = n.json().pipe(n.metadata()).catch({}).parse(event.content);
|
||||
return [name, nip05].filter(Boolean).join('\n');
|
||||
const nip05splitted = nip05 ? nip05.split(/[_@.]/) : [];
|
||||
|
||||
return [name, nip05, ...nip05splitted].filter(Boolean).join('\n');
|
||||
}
|
||||
|
||||
/** Build search content from tag values. */
|
||||
|
||||
Reference in New Issue
Block a user