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 faab8ee608..58600c0eb3 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,