summaryrefslogtreecommitdiff
path: root/src/services/following/create.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-01 01:12:02 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-01 01:12:02 +0900
commitbae44b47086d8a0f0c8f96254b9453a29490a508 (patch)
tree09524e23dab78eee6668d4c3a3056ac8063aa4a8 /src/services/following/create.ts
parentwip (diff)
downloadmisskey-bae44b47086d8a0f0c8f96254b9453a29490a508.tar.gz
misskey-bae44b47086d8a0f0c8f96254b9453a29490a508.tar.bz2
misskey-bae44b47086d8a0f0c8f96254b9453a29490a508.zip
wip
Diffstat (limited to 'src/services/following/create.ts')
-rw-r--r--src/services/following/create.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/services/following/create.ts b/src/services/following/create.ts
index 03a8f399e8..39cecfddfb 100644
--- a/src/services/following/create.ts
+++ b/src/services/following/create.ts
@@ -28,6 +28,12 @@ export default async function(follower: IUser, followee: IUser) {
}
});
+ User.update({ _id: followee._id }, {
+ $inc: {
+ pendingReceivedFollowRequestsCount: 1
+ }
+ });
+
// Publish reciveRequest event
if (isLocalUser(followee)) {
packUser(follower, followee).then(packed => event(followee._id, 'reciveRequest', packed)),