summaryrefslogtreecommitdiff
path: root/packages/backend/src/core
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-06-06 03:20:27 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-06-09 11:02:36 -0400
commit20cc73645765fc7434525e29647eafe98bf84926 (patch)
tree091e2ed7baa85eadf8ea26ec53df394e2bbf0ac4 /packages/backend/src/core
parentfix note/user accumulation in NoteEntityService.packMany, improving performan... (diff)
downloadsharkey-20cc73645765fc7434525e29647eafe98bf84926.tar.gz
sharkey-20cc73645765fc7434525e29647eafe98bf84926.tar.bz2
sharkey-20cc73645765fc7434525e29647eafe98bf84926.zip
fix single-user relation calculations
Diffstat (limited to 'packages/backend/src/core')
-rw-r--r--packages/backend/src/core/entities/UserEntityService.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts
index 84b6a4a021..5aaa345e75 100644
--- a/packages/backend/src/core/entities/UserEntityService.ts
+++ b/packages/backend/src/core/entities/UserEntityService.ts
@@ -220,13 +220,13 @@ export class UserEntityService implements OnModuleInit {
},
}),
this.cacheService.userBlockedCache.fetch(me)
- .then(blockers => blockers.size > 0),
+ .then(blockers => blockers.has(target)),
this.cacheService.userBlockingCache.fetch(me)
- .then(blockees => blockees.size > 0),
+ .then(blockees => blockees.has(target)),
this.cacheService.userMutingsCache.fetch(me)
- .then(mutings => mutings.size > 0),
+ .then(mutings => mutings.has(target)),
this.cacheService.renoteMutingsCache.fetch(me)
- .then(mutings => mutings.size > 0),
+ .then(mutings => mutings.has(target)),
this.cacheService.userByIdCache.fetch(target, () => this.usersRepository.findOneByOrFail({ id: target }))
.then(user => user.host),
this.userMemosRepository.createQueryBuilder('m')