mirror of
https://github.com/aljazceru/ditto.git
synced 2026-02-21 04:55:59 +01:00
Load local timeline a lot faster by using leftJoin instead of innerJoin, wow
This commit is contained in:
@@ -156,7 +156,8 @@ function getFilterQuery(filter: DittoFilter): EventQuery {
|
||||
|
||||
if (typeof filter.local === 'boolean') {
|
||||
query = filter.local
|
||||
? query.innerJoin(usersQuery, (join) => join.onRef('users.d_tag', '=', 'events.pubkey'))
|
||||
? query.leftJoin(usersQuery, (join) => join.onRef('users.d_tag', '=', 'events.pubkey'))
|
||||
.where('users.d_tag', 'is not', null)
|
||||
: query.leftJoin(usersQuery, (join) => join.onRef('users.d_tag', '=', 'events.pubkey'))
|
||||
.where('users.d_tag', 'is', null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user