This commit is contained in:
syuilo 2020-03-28 18:07:41 +09:00
parent 9ea1ed8559
commit 614a1d74dd
21 changed files with 229 additions and 91 deletions

View file

@ -57,7 +57,9 @@ export async function insertFollowingDoc(followee: User, follower: User) {
});
// 通知を作成
createNotification(follower.id, followee.id, 'followRequestAccepted');
createNotification(follower.id, 'followRequestAccepted', {
notifierId: followee.id,
});
}
if (alreadyFollowed) return;
@ -95,7 +97,9 @@ export async function insertFollowingDoc(followee: User, follower: User) {
Users.pack(follower, followee).then(packed => publishMainStream(followee.id, 'followed', packed)),
// 通知を作成
createNotification(followee.id, follower.id, 'follow');
createNotification(followee.id, 'follow', {
notifierId: follower.id
});
}
}

View file

@ -50,7 +50,8 @@ export default async function(follower: User, followee: User, requestId?: string
}).then(packed => publishMainStream(followee.id, 'meUpdated', packed));
// 通知を作成
createNotification(followee.id, follower.id, 'receiveFollowRequest', {
createNotification(followee.id, 'receiveFollowRequest', {
notifierId: follower.id,
followRequestId: followRequest.id
});
}