fix(server): エクスポートした絵文字の拡張子がfalseになることがあるのを修正
This commit is contained in:
parent
b14e347da1
commit
3e00ce0d88
|
@ -65,7 +65,8 @@ export async function exportCustomEmojis(job: Bull.Job, done: () => void): Promi
|
||||||
|
|
||||||
for (const emoji of customEmojis) {
|
for (const emoji of customEmojis) {
|
||||||
const exportId = ulid().toLowerCase();
|
const exportId = ulid().toLowerCase();
|
||||||
const emojiPath = path + '/' + exportId + '.' + mime.extension(emoji.type);
|
const ext = mime.extension(emoji.type);
|
||||||
|
const emojiPath = path + '/' + exportId + (ext ? '.' + ext : '');
|
||||||
fs.writeFileSync(emojiPath, '', 'binary');
|
fs.writeFileSync(emojiPath, '', 'binary');
|
||||||
let downloaded = false;
|
let downloaded = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue