なんか
This commit is contained in:
parent
c32a5d602b
commit
ccea1755fc
3 changed files with 11 additions and 6 deletions
|
@ -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,
|
||||
} : {}),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue