fix: Handle emoji field in imported documents

closes #5810
This commit is contained in:
Tom Moor
2023-09-13 22:05:21 -04:00
parent ef22a5dc52
commit 7e17e82ac8
5 changed files with 29 additions and 25 deletions

View File

@@ -81,7 +81,7 @@ export default class ImportMarkdownZipTask extends ImportTask {
return;
}
const { title, text } = await documentImporter({
const { title, emoji, text } = await documentImporter({
mimeType: "text/markdown",
fileName: child.name,
content: await zipObject.async("string"),
@@ -123,6 +123,7 @@ export default class ImportMarkdownZipTask extends ImportTask {
output.documents.push({
id,
title,
emoji,
text,
updatedAt,
createdAt,

View File

@@ -86,7 +86,7 @@ export default class ImportNotionTask extends ImportTask {
Logger.debug("task", `Processing ${name} as ${mimeType}`);
const { title, text } = await documentImporter({
const { title, emoji, text } = await documentImporter({
mimeType: mimeType || "text/markdown",
fileName: name,
content: zipObject ? await zipObject.async("string") : "",
@@ -117,6 +117,7 @@ export default class ImportNotionTask extends ImportTask {
output.documents.push({
id,
title,
emoji,
text,
collectionId,
parentDocumentId,

View File

@@ -55,6 +55,7 @@ export type StructuredImportData = {
id: string;
urlId?: string;
title: string;
emoji?: string;
/**
* The document text. To reference an attachment or image use the special
* formatting <<attachmentId>>. It will be replaced with a reference to the