From 384bb729b4c3e053e3cae99695e9aa7c3a7cafc5 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 3 Jan 2024 20:59:46 -0600 Subject: [PATCH] EventsDB: fix `this` binding of usersQuery --- src/storages/events-db.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }