mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
fix mixed-up userFollowingsCache / userFollowersCache
This commit is contained in:
parent
51572b7314
commit
ed766e98e1
2 changed files with 5 additions and 5 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Reference in a new issue