This commit is contained in:
syuilo 2018-06-01 01:12:02 +09:00
parent 35115607bc
commit bae44b4708
5 changed files with 25 additions and 1 deletions

View file

@ -11,8 +11,14 @@ export default async function(followee: IUser, follower: IUser) {
deliver(followee as ILocalUser, content, follower.inbox);
}
FollowRequest.remove({
await FollowRequest.remove({
followeeId: followee._id,
followerId: follower._id
});
User.update({ _id: followee._id }, {
$inc: {
pendingReceivedFollowRequestsCount: -1
}
});
}