EventsDB: fix this binding of usersQuery

This commit is contained in:
Alex Gleason
2024-01-03 20:59:46 -06:00
parent 939eeae25a
commit 384bb729b4

View File

@@ -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);
}