fix single-user relation calculations

This commit is contained in:
Hazelnoot 2025-06-06 03:20:27 -04:00
parent 223cdc9ea9
commit 20cc736457

View file

@ -220,13 +220,13 @@ export class UserEntityService implements OnModuleInit {
}, },
}), }),
this.cacheService.userBlockedCache.fetch(me) this.cacheService.userBlockedCache.fetch(me)
.then(blockers => blockers.size > 0), .then(blockers => blockers.has(target)),
this.cacheService.userBlockingCache.fetch(me) this.cacheService.userBlockingCache.fetch(me)
.then(blockees => blockees.size > 0), .then(blockees => blockees.has(target)),
this.cacheService.userMutingsCache.fetch(me) this.cacheService.userMutingsCache.fetch(me)
.then(mutings => mutings.size > 0), .then(mutings => mutings.has(target)),
this.cacheService.renoteMutingsCache.fetch(me) 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 })) this.cacheService.userByIdCache.fetch(target, () => this.usersRepository.findOneByOrFail({ id: target }))
.then(user => user.host), .then(user => user.host),
this.userMemosRepository.createQueryBuilder('m') this.userMemosRepository.createQueryBuilder('m')