未知のユーザーが deleteActor されたら処理をスキップする (#10067)

This commit is contained in:
xianon 2023-02-25 04:27:37 +09:00 committed by GitHub
parent 0691901345
commit 0ec5327474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -450,8 +450,10 @@ export class ApInboxService {
return `skip: delete actor ${actor.uri} !== ${uri}`; return `skip: delete actor ${actor.uri} !== ${uri}`;
} }
const user = await this.usersRepository.findOneByOrFail({ id: actor.id }); const user = await this.usersRepository.findOneBy({ id: actor.id });
if (user.isDeleted) { if (user == null) {
return 'skip: actor not found';
} else if (user.isDeleted) {
return 'skip: already deleted'; return 'skip: already deleted';
} }