fix mixed-up userFollowingsCache / userFollowersCache

This commit is contained in:
Hazelnoot 2025-06-09 11:37:51 -04:00
parent 51572b7314
commit ed766e98e1
2 changed files with 5 additions and 5 deletions

View file

@ -113,7 +113,7 @@ class DeliverManager {
if (this.recipes.some(r => isFollowers(r))) {
// followers deliver
// ただ、sharedInboxがnullなリモートユーザーも稀におり、その対応ができなさそう
const followers = await this.cacheService.userFollowingsCache
const followers = await this.cacheService.userFollowersCache
.fetch(this.actor.id)
.then(f => Array
.from(f.values())

View file

@ -250,8 +250,8 @@ export class UserEntityService implements OnModuleInit {
@bindThis
public async getRelations(me: MiUser['id'], targets: MiUser['id'][]): Promise<Map<MiUser['id'], UserRelation>> {
const [
followers,
followees,
myFollowing,
myFollowers,
followersRequests,
followeesRequests,
blockers,
@ -300,7 +300,7 @@ export class UserEntityService implements OnModuleInit {
return new Map(
targets.map(target => {
const following = followers.get(target) ?? null;
const following = myFollowing.get(target) ?? null;
return [
target,
@ -308,7 +308,7 @@ export class UserEntityService implements OnModuleInit {
id: target,
following: following,
isFollowing: following != null,
isFollowed: followees.has(target),
isFollowed: myFollowers.has(target),
hasPendingFollowRequestFromYou: followersRequests.includes(target),
hasPendingFollowRequestToYou: followeesRequests.includes(target),
isBlocking: blockees.has(target),