Also track events from local users

This commit is contained in:
Alex Gleason 2023-08-09 14:24:49 -05:00
parent 3b3947ea61
commit f127aa7406
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import { Conf } from '@/config.ts'; import { Conf } from '@/config.ts';
import { insertEvent, isLocallyFollowed } from '@/db/events.ts'; import { insertEvent, isLocallyFollowed } from '@/db/events.ts';
import { findUser } from '@/db/users.ts';
import { RelayPool } from '@/deps.ts'; import { RelayPool } from '@/deps.ts';
import { trends } from '@/trends.ts'; import { trends } from '@/trends.ts';
import { nostrDate, nostrNow } from '@/utils.ts'; import { nostrDate, nostrNow } from '@/utils.ts';
@ -25,7 +26,7 @@ async function handleEvent(event: SignedEvent): Promise<void> {
trackHashtags(event); trackHashtags(event);
if (await isLocallyFollowed(event.pubkey)) { if (await findUser({ pubkey: event.pubkey }) || await isLocallyFollowed(event.pubkey)) {
insertEvent(event).catch(console.warn); insertEvent(event).catch(console.warn);
} }
} }