From c061a1731ef383ff90c4c57c7ef36e2ef407c3e8 Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-net@users.noreply.github.com> Date: Thu, 22 Aug 2024 20:56:39 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BCnull?= =?UTF-8?q?(System)=E3=81=AE=E5=A0=B4=E5=90=88force=E3=81=8Cfalse=E3=81=A7?= =?UTF-8?q?=E3=82=82=E6=96=B0=E8=A6=8F=E8=BF=BD=E5=8A=A0=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#363)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_YOJO.md | 1 + packages/backend/src/core/DriveService.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG_YOJO.md b/CHANGELOG_YOJO.md index 41cbcb777c..4f33e2e744 100644 --- a/CHANGELOG_YOJO.md +++ b/CHANGELOG_YOJO.md @@ -33,6 +33,7 @@ - ユーザー検索画面で照会しますか?のダイアログが2つ出る問題 ### Server +- Fix: ユーザーnull(System)の場合forceがfalseでも新規追加されるのを修正 - Fix: Outboxから投稿を所得する際にタイムラインに投稿が流れないように - Fix: 翻訳にdeepl以外を利用していると翻訳できない問題を修正 [#355](https://github.com/yojo-art/cherrypick/pull/355) diff --git a/packages/backend/src/core/DriveService.ts b/packages/backend/src/core/DriveService.ts index 51c89ab81f..4ad4627024 100644 --- a/packages/backend/src/core/DriveService.ts +++ b/packages/backend/src/core/DriveService.ts @@ -551,11 +551,11 @@ export class DriveService { ext ?? info.type.ext, ); - if (user && !force) { + if (!force) { // Check if there is a file with the same hash const matched = await this.driveFilesRepository.findOneBy({ md5: info.md5, - userId: user.id, + userId: user ? user.id : undefined, }); if (matched) {