Fix: Don't delete remote emoji when import zip (#15674)
* Fix: Don't delete remote emoji when import zip * Update packages/backend/src/queue/processors/ImportCustomEmojisProcessorService.ts Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com> --------- Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com>
This commit is contained in:
		@@ -6,6 +6,7 @@
 | 
			
		||||
import * as fs from 'node:fs';
 | 
			
		||||
import { Inject, Injectable } from '@nestjs/common';
 | 
			
		||||
import { ZipReader } from 'slacc';
 | 
			
		||||
import { IsNull } from 'typeorm';
 | 
			
		||||
import { DI } from '@/di-symbols.js';
 | 
			
		||||
import type { EmojisRepository, DriveFilesRepository } from '@/models/_.js';
 | 
			
		||||
import type Logger from '@/logger.js';
 | 
			
		||||
@@ -86,6 +87,7 @@ export class ImportCustomEmojisProcessorService {
 | 
			
		||||
				const emojiPath = outputPath + '/' + record.fileName;
 | 
			
		||||
				await this.emojisRepository.delete({
 | 
			
		||||
					name: emojiInfo.name,
 | 
			
		||||
					host: IsNull(),
 | 
			
		||||
				});
 | 
			
		||||
 | 
			
		||||
				try {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user