From 33cb50761ec12fc0df0e6f99ba97e0d5d4e580fc Mon Sep 17 00:00:00 2001 From: Ebise Lutica <7106976+EbiseLutica@users.noreply.github.com> Date: Sun, 18 Feb 2024 01:57:25 +0900 Subject: [PATCH] fix --- packages/backend/src/core/NoteCreateService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'); } }