diff --git a/src/storages/events-db.ts b/src/storages/events-db.ts index f6ed16f..f5c4384 100644 --- a/src/storages/events-db.ts +++ b/src/storages/events-db.ts @@ -400,6 +400,8 @@ function buildSearchContent(event: Event): string { return buildUserSearchContent(event as Event<0>); case 1: return event.content; + case 30009: + return buildTagsSearchContent(event.tags.filter(([t]) => t !== 'alt')); default: return ''; } @@ -411,4 +413,9 @@ function buildUserSearchContent(event: Event<0>): string { 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 };