Skip to content

Commit

Permalink
未知のユーザーが deleteActor されたら処理をスキップする
Browse files Browse the repository at this point in the history
  • Loading branch information
yu256 committed Mar 5, 2023
1 parent 8cccb74 commit b0f1df9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ export async function deleteActor(actor: CacheableRemoteUser, uri: string): Prom
return `skip: delete actor ${actor.uri} !== ${uri}`;
}

const user = await Users.findOneByOrFail({ id: actor.id });
if (user.isDeleted) {
const user = await Users.findOneBy({ id: actor.id });
if (user == null) {
logger.info(`skip: actor not found`);
} else if (user.isDeleted) {
logger.info(`skip: already deleted`);
}

Expand Down

0 comments on commit b0f1df9

Please sign in to comment.