なんか
This commit is contained in:
@ -125,6 +125,14 @@ export class UserRepository extends Repository<User> {
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
public async getHasPendingReceivedFollowRequest(userId: User['id']): Promise<boolean> {
|
||||
const count = await FollowRequests.count({
|
||||
followeeId: userId
|
||||
});
|
||||
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
public async pack(
|
||||
src: User['id'] | User,
|
||||
me?: User['id'] | User | null | undefined,
|
||||
@ -226,9 +234,7 @@ export class UserRepository extends Repository<User> {
|
||||
hasUnreadAntenna: this.getHasUnreadAntenna(user.id),
|
||||
hasUnreadMessagingMessage: this.getHasUnreadMessagingMessage(user.id),
|
||||
hasUnreadNotification: this.getHasUnreadNotification(user.id),
|
||||
pendingReceivedFollowRequestsCount: FollowRequests.count({
|
||||
followeeId: user.id
|
||||
}),
|
||||
hasPendingReceivedFollowRequest: this.getHasPendingReceivedFollowRequest(user.id),
|
||||
integrations: profile!.integrations,
|
||||
} : {}),
|
||||
|
||||
|
Reference in New Issue
Block a user