mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix(EventsDB): also add a split only by '@' at symbol
This commit is contained in:
parent
92231dc452
commit
5412d2a07b
1 changed files with 2 additions and 1 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue