wip
This commit is contained in:
@ -416,7 +416,7 @@ export const pack = (
|
||||
}
|
||||
|
||||
if (meId && !meId.equals(_user.id)) {
|
||||
const [following1, following2, mute] = await Promise.all([
|
||||
const [following1, following2, followReq1, followReq2, mute] = await Promise.all([
|
||||
Following.findOne({
|
||||
followerId: meId,
|
||||
followeeId: _user.id
|
||||
@ -425,6 +425,14 @@ export const pack = (
|
||||
followerId: _user.id,
|
||||
followeeId: meId
|
||||
}),
|
||||
_user.isLocked ? FollowRequest.findOne({
|
||||
followerId: meId,
|
||||
followeeId: _user.id
|
||||
}) : Promise.resolve(null),
|
||||
FollowRequest.findOne({
|
||||
followerId: _user.id,
|
||||
followeeId: meId
|
||||
}),
|
||||
Mute.findOne({
|
||||
muterId: meId,
|
||||
muteeId: _user.id
|
||||
@ -435,6 +443,9 @@ export const pack = (
|
||||
_user.isFollowing = following1 !== null;
|
||||
_user.isStalking = following1 && following1.stalk;
|
||||
|
||||
_user.hasPendingFollowRequestFromYou = followReq1 !== null;
|
||||
_user.hasPendingFollowRequestToYou = followReq2 !== null;
|
||||
|
||||
// Whether the user is followed
|
||||
_user.isFollowed = following2 !== null;
|
||||
|
||||
|
Reference in New Issue
Block a user