diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts index faab8ee60..58600c0eb 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts @@ -72,6 +72,8 @@ export default class extends Endpoint { // eslint- const isDuplicate = await this.customEmojiService.checkDuplicate(ps.name); if (isDuplicate) throw new ApiError(meta.errors.duplicateName); + if (driveFile.user !== null) await this.driveFilesRepository.update(driveFile.id, { user: null }); + const emoji = await this.customEmojiService.add({ driveFile, name: ps.name,