From 1e8c1efe2f67c761ab824db430b792773a2ace48 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 28 Jul 2018 07:56:33 +0900 Subject: [PATCH] Fix #2013 --- src/services/following/requests/accept.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/services/following/requests/accept.ts b/src/services/following/requests/accept.ts index 0a7674a4b8..817662ab6d 100644 --- a/src/services/following/requests/accept.ts +++ b/src/services/following/requests/accept.ts @@ -66,6 +66,12 @@ export default async function(followee: IUser, follower: IUser) { }); //#endregion + await User.update({ _id: followee._id }, { + $inc: { + pendingReceivedFollowRequestsCount: -1 + } + }); + packUser(followee, followee, { detail: true }).then(packed => event(followee._id, 'meUpdated', packed));