1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-06-08 16:44:08 +02:00

Fix bug: Check following request existance

This commit is contained in:
syuilo
2018-08-23 14:56:39 +09:00
parent 37865cb381
commit e31a2f7e55
2 changed files with 14 additions and 1 deletions

View File

@@ -12,6 +12,15 @@ export default async function(followee: IUser, follower: IUser) {
deliver(follower as ILocalUser, content, followee.inbox);
}
const request = await FollowRequest.findOne({
followeeId: followee._id,
followerId: follower._id
});
if (request == null) {
throw 'request not found';
}
await FollowRequest.remove({
followeeId: followee._id,
followerId: follower._id