mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix email attachment not being saved as item
This commit is contained in:
parent
f1c4bc6a74
commit
ebb45f1973
1 changed files with 3 additions and 2 deletions
|
|
@ -150,7 +150,7 @@ export function emailAttachmentRouter() {
|
|||
? PageType.File
|
||||
: PageType.Book
|
||||
const title = subject || uploadFileData.fileName
|
||||
const articleToSave: DeepPartial<LibraryItem> = {
|
||||
const itemToCreate: DeepPartial<LibraryItem> = {
|
||||
originalUrl: uploadFileUrlOverride,
|
||||
itemType,
|
||||
textContentHash: uploadFileHash,
|
||||
|
|
@ -159,9 +159,10 @@ export function emailAttachmentRouter() {
|
|||
readableContent: '',
|
||||
slug: generateSlug(title),
|
||||
state: LibraryItemState.Succeeded,
|
||||
user: { id: user.id },
|
||||
}
|
||||
|
||||
const pageId = await createLibraryItem(articleToSave, user.id)
|
||||
const pageId = await createLibraryItem(itemToCreate, user.id)
|
||||
|
||||
// update received email type
|
||||
await updateReceivedEmail(receivedEmailId, 'article', user.id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue