Skip to content

Commit

Permalink
Fix: ユーザーnull(System)の場合forceがfalseでも新規追加されるのを修正 (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
penginn-net authored Aug 22, 2024
1 parent 611ec80 commit c061a17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_YOJO.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- ユーザー検索画面で照会しますか?のダイアログが2つ出る問題

### Server
- Fix: ユーザーnull(System)の場合forceがfalseでも新規追加されるのを修正
- Fix: Outboxから投稿を所得する際にタイムラインに投稿が流れないように
- Fix: 翻訳にdeepl以外を利用していると翻訳できない問題を修正 [#355](https://github.com/yojo-art/cherrypick/pull/355)

Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/DriveService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c061a17

Please sign in to comment.