mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
EventsDB: index badges in FTS
This commit is contained in:
parent
8b3aee7e48
commit
58c2c8eb7f
1 changed files with 7 additions and 0 deletions
|
|
@ -400,6 +400,8 @@ function buildSearchContent(event: Event): string {
|
||||||
return buildUserSearchContent(event as Event<0>);
|
return buildUserSearchContent(event as Event<0>);
|
||||||
case 1:
|
case 1:
|
||||||
return event.content;
|
return event.content;
|
||||||
|
case 30009:
|
||||||
|
return buildTagsSearchContent(event.tags.filter(([t]) => t !== 'alt'));
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
@ -411,4 +413,9 @@ function buildUserSearchContent(event: Event<0>): string {
|
||||||
return [name, nip05, about].filter(Boolean).join('\n');
|
return [name, nip05, about].filter(Boolean).join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Build search content from tag values. */
|
||||||
|
function buildTagsSearchContent(tags: string[][]): string {
|
||||||
|
return tags.map(([_tag, value]) => value).join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
export { EventsDB };
|
export { EventsDB };
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue