wip
This commit is contained in:
parent
8dfd892b71
commit
4feff8835c
6 changed files with 27 additions and 18 deletions
|
|
@ -25,7 +25,7 @@ export default async function(follower: IUser, followee: IUser) {
|
|||
}
|
||||
});
|
||||
|
||||
User.update({ _id: followee._id }, {
|
||||
await User.update({ _id: followee._id }, {
|
||||
$inc: {
|
||||
pendingReceivedFollowRequestsCount: 1
|
||||
}
|
||||
|
|
@ -33,7 +33,11 @@ export default async function(follower: IUser, followee: IUser) {
|
|||
|
||||
// Publish reciveRequest event
|
||||
if (isLocalUser(followee)) {
|
||||
packUser(follower, followee).then(packed => event(followee._id, 'reciveFollowRequest', packed)),
|
||||
packUser(follower, followee).then(packed => event(followee._id, 'reciveFollowRequest', packed));
|
||||
|
||||
packUser(followee, followee, {
|
||||
detail: true
|
||||
}).then(packed => event(followee._id, 'meUpdated', packed));
|
||||
|
||||
// 通知を作成
|
||||
notify(followee._id, follower._id, 'reciveFollowRequest');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue