mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 12:14:18 +00:00
fix mixed-up userFollowingsCache / userFollowersCache
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user