diff --git a/src/storages/events-db.ts b/src/storages/events-db.ts index 9f5391d..4fcaf49 100644 --- a/src/storages/events-db.ts +++ b/src/storages/events-db.ts @@ -187,7 +187,7 @@ class EventsDB implements EventStore { if (typeof filter.local === 'boolean') { query = query - .leftJoin(this.usersQuery, (join) => join.onRef('users.d_tag', '=', 'events.pubkey')) + .leftJoin(() => this.usersQuery(), (join) => join.onRef('users.d_tag', '=', 'events.pubkey')) .where('users.d_tag', filter.local ? 'is not' : 'is', null); }