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))) {
|
if (this.recipes.some(r => isFollowers(r))) {
|
||||||
// followers deliver
|
// followers deliver
|
||||||
// ただ、sharedInboxがnullなリモートユーザーも稀におり、その対応ができなさそう?
|
// ただ、sharedInboxがnullなリモートユーザーも稀におり、その対応ができなさそう?
|
||||||
const followers = await this.cacheService.userFollowingsCache
|
const followers = await this.cacheService.userFollowersCache
|
||||||
.fetch(this.actor.id)
|
.fetch(this.actor.id)
|
||||||
.then(f => Array
|
.then(f => Array
|
||||||
.from(f.values())
|
.from(f.values())
|
||||||
|
|||||||
@@ -250,8 +250,8 @@ export class UserEntityService implements OnModuleInit {
|
|||||||
@bindThis
|
@bindThis
|
||||||
public async getRelations(me: MiUser['id'], targets: MiUser['id'][]): Promise<Map<MiUser['id'], UserRelation>> {
|
public async getRelations(me: MiUser['id'], targets: MiUser['id'][]): Promise<Map<MiUser['id'], UserRelation>> {
|
||||||
const [
|
const [
|
||||||
followers,
|
myFollowing,
|
||||||
followees,
|
myFollowers,
|
||||||
followersRequests,
|
followersRequests,
|
||||||
followeesRequests,
|
followeesRequests,
|
||||||
blockers,
|
blockers,
|
||||||
@@ -300,7 +300,7 @@ export class UserEntityService implements OnModuleInit {
|
|||||||
|
|
||||||
return new Map(
|
return new Map(
|
||||||
targets.map(target => {
|
targets.map(target => {
|
||||||
const following = followers.get(target) ?? null;
|
const following = myFollowing.get(target) ?? null;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
target,
|
target,
|
||||||
@@ -308,7 +308,7 @@ export class UserEntityService implements OnModuleInit {
|
|||||||
id: target,
|
id: target,
|
||||||
following: following,
|
following: following,
|
||||||
isFollowing: following != null,
|
isFollowing: following != null,
|
||||||
isFollowed: followees.has(target),
|
isFollowed: myFollowers.has(target),
|
||||||
hasPendingFollowRequestFromYou: followersRequests.includes(target),
|
hasPendingFollowRequestFromYou: followersRequests.includes(target),
|
||||||
hasPendingFollowRequestToYou: followeesRequests.includes(target),
|
hasPendingFollowRequestToYou: followeesRequests.includes(target),
|
||||||
isBlocking: blockees.has(target),
|
isBlocking: blockees.has(target),
|
||||||
|
|||||||
Reference in New Issue
Block a user