diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index c11eb771b5b5..c02601e97723 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -361,8 +361,8 @@ export class NoteCreateService implements OnApplicationShutdown { // #region Shrimpia if (user.host != null && mentionedUsers.length > 0) { - const userEntity = await this.usersRepository.findOneByOrFail({ id: user.id }); - if (userEntity.followersCount === 0) { + const userEntity = await this.usersRepository.findOneBy({ id: user.id }); + if ((userEntity?.followersCount ?? 0) === 0) { throw new Error('Temporarily, notes including mentions from remote users which no followers are not allowed'); } }