mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-24 00:34:25 +01:00
Hydrate event author in pipeline to relieve streaming API
This commit is contained in:
@@ -6,6 +6,7 @@ import { deleteAttachedMedia } from '@/db/unattached-media.ts';
|
||||
import { Debug, LNURL, type NostrEvent } from '@/deps.ts';
|
||||
import { DittoEvent } from '@/interfaces/DittoEvent.ts';
|
||||
import { isEphemeralKind } from '@/kinds.ts';
|
||||
import { getAuthor } from '@/queries.ts';
|
||||
import { updateStats } from '@/stats.ts';
|
||||
import { purifyEvent } from '@/storages/hydrate.ts';
|
||||
import { cache, client, eventsDB, reqmeister } from '@/storages.ts';
|
||||
@@ -58,6 +59,9 @@ async function hydrateEvent(event: DittoEvent): Promise<void> {
|
||||
const [user] = await eventsDB.query([{ kinds: [30361], authors: [Conf.pubkey], '#d': [event.pubkey], limit: 1 }]);
|
||||
event.user = user;
|
||||
|
||||
const author = await getAuthor(event.pubkey);
|
||||
event.author = author;
|
||||
|
||||
const domain = await db
|
||||
.selectFrom('pubkey_domains')
|
||||
.select('domain')
|
||||
|
||||
Reference in New Issue
Block a user