Fix: Continue importing from file if single emoji import fails
This commit is contained in:
parent
44f62160cb
commit
ed894efa1a
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
- ファイルがサイズの制限を超えてアップロードされた際にエラーを返さなかった問題を修正
|
- ファイルがサイズの制限を超えてアップロードされた際にエラーを返さなかった問題を修正
|
||||||
|
- Fix: Continue importing from file if single emoji import fails
|
||||||
|
|
||||||
## 2024.8.0
|
## 2024.8.0
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@ export class ImportCustomEmojisProcessorService {
|
||||||
await this.emojisRepository.delete({
|
await this.emojisRepository.delete({
|
||||||
name: emojiInfo.name,
|
name: emojiInfo.name,
|
||||||
});
|
});
|
||||||
|
try {
|
||||||
const driveFile = await this.driveService.addFile({
|
const driveFile = await this.driveService.addFile({
|
||||||
user: null,
|
user: null,
|
||||||
path: emojiPath,
|
path: emojiPath,
|
||||||
|
@ -104,6 +105,12 @@ export class ImportCustomEmojisProcessorService {
|
||||||
localOnly: emojiInfo.localOnly,
|
localOnly: emojiInfo.localOnly,
|
||||||
roleIdsThatCanBeUsedThisEmojiAsReaction: [],
|
roleIdsThatCanBeUsedThisEmojiAsReaction: [],
|
||||||
});
|
});
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Error || typeof e === 'string') {
|
||||||
|
this.logger.error(`couldn't import ${emojiPath} for ${emojiInfo.name}: ${e}`);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
Loading…
Reference in New Issue