Skip to content

Commit

Permalink
Fix:絵文字インポート時に毎回ドライブファイルが生成されないように (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
penginn-net authored Aug 23, 2024
1 parent 010f9f6 commit 1087514
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_YOJO.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- Fix: ユーザーnull(System)の場合forceがfalseでも新規追加されるのを修正
- Fix: Outboxから投稿を所得する際にタイムラインに投稿が流れないように
- Fix: 翻訳にdeepl以外を利用していると翻訳できない問題を修正 [#355](https://github.com/yojo-art/cherrypick/pull/355)
- Fix: 絵文字インポート時にすでにファイルがあるならそれを使うように

### Misc

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const paramDef = {
// TODO: ロジックをサービスに切り出す

@Injectable()
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-next-line import/no-default-export
export default class extends Endpoint<typeof meta, typeof paramDef> {
constructor(
@Inject(DI.emojisRepository)
private emojisRepository: EmojisRepository,
Expand All @@ -88,7 +88,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // 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();
Expand Down

0 comments on commit 1087514

Please sign in to comment.