フォローリクエストがなくてもフォロー承認が出来てしまうのを修正 (#7013)
* フォローリクエストがなくてもフォロー承認が出来てしまうのを修正 * プロキシアカウントがDB処理をせずにフォローを飛ばしているのを修正
This commit is contained in:
parent
c6cfc3f908
commit
c5bdee086d
3 changed files with 17 additions and 7 deletions
|
@ -33,6 +33,11 @@ export const meta = {
|
|||
code: 'NO_SUCH_USER',
|
||||
id: '66ce1645-d66c-46bb-8b79-96739af885bd'
|
||||
},
|
||||
noFollowRequest: {
|
||||
message: 'No follow request.',
|
||||
code: 'NO_FOLLOW_REQUEST',
|
||||
id: 'bcde4f8b-0913-4614-8881-614e522fb041'
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -43,7 +48,10 @@ export default define(meta, async (ps, user) => {
|
|||
throw e;
|
||||
});
|
||||
|
||||
await acceptFollowRequest(user, follower);
|
||||
await acceptFollowRequest(user, follower).catch(e => {
|
||||
if (e.id === '8884c2dd-5795-4ac9-b27e-6a01d38190f9') throw new ApiError(meta.errors.noFollowRequest);
|
||||
throw e;
|
||||
});
|
||||
|
||||
return;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue