diff --git a/CHANGELOG_YOJO.md b/CHANGELOG_YOJO.md index 338575c4b3..f47e502fcd 100644 --- a/CHANGELOG_YOJO.md +++ b/CHANGELOG_YOJO.md @@ -38,6 +38,7 @@ - Fix: ユーザーnull(System)の場合forceがfalseでも新規追加されるのを修正 - Fix: Outboxから投稿を所得する際にタイムラインに投稿が流れないように - Fix: 翻訳にdeepl以外を利用していると翻訳できない問題を修正 [#355](https://github.com/yojo-art/cherrypick/pull/355) +- Fix: 絵文字インポート時にすでにファイルがあるならそれを使うように ### Misc diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts index 975f892df9..e414239390 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -75,7 +75,7 @@ export default class extends Endpoint { // eslint- try { // Create file - driveFile = await this.driveService.uploadFromUrl({ url: emoji.originalUrl, user: null, force: true }); + driveFile = await this.driveService.uploadFromUrl({ url: emoji.originalUrl, user: null, force: false }); } catch (e) { // TODO: need to return Drive Error throw new ApiError(); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/steal.ts b/packages/backend/src/server/api/endpoints/admin/emoji/steal.ts index a22d784d14..2bbb1a954a 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/steal.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/steal.ts @@ -64,7 +64,7 @@ export const paramDef = { // TODO: ロジックをサービスに切り出す @Injectable() -export default class extends Endpoint { // eslint-disable-next-line import/no-default-export +export default class extends Endpoint { constructor( @Inject(DI.emojisRepository) private emojisRepository: EmojisRepository, @@ -88,7 +88,7 @@ export default class extends Endpoint { // eslint- try { // Create file - driveFile = await this.driveService.uploadFromUrl({ url: emoji.originalUrl, user: null, force: true }); + driveFile = await this.driveService.uploadFromUrl({ url: emoji.originalUrl, user: null, force: false }); } catch (e) { // TODO: need to return Drive Error throw new ApiError();