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

@ -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)),