mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix: tweet not saved correctly when using share button on iOS
This commit is contained in:
parent
6ef970a6e4
commit
f372636d6e
1 changed files with 18 additions and 17 deletions
|
|
@ -117,7 +117,24 @@ export const savePage = async (
|
|||
? await createLabels(ctx, input.labels)
|
||||
: undefined
|
||||
|
||||
if (existingPage) {
|
||||
// always parse in backend if the url is in the force puppeteer list
|
||||
if (shouldParseInBackend(input)) {
|
||||
try {
|
||||
await createPageSaveRequest({
|
||||
userId: saver.userId,
|
||||
url: articleToSave.url,
|
||||
pubsub: ctx.pubsub,
|
||||
articleSavingRequestId: input.clientRequestId,
|
||||
archivedAt: articleToSave.archivedAt,
|
||||
labels: articleToSave.labels,
|
||||
})
|
||||
} catch (e) {
|
||||
return {
|
||||
errorCodes: [SaveErrorCode.Unknown],
|
||||
message: 'Failed to create page save request',
|
||||
}
|
||||
}
|
||||
} else if (existingPage) {
|
||||
pageId = existingPage.id
|
||||
slug = existingPage.slug
|
||||
if (
|
||||
|
|
@ -138,22 +155,6 @@ export const savePage = async (
|
|||
message: 'Failed to update existing page',
|
||||
}
|
||||
}
|
||||
} else if (shouldParseInBackend(input)) {
|
||||
try {
|
||||
await createPageSaveRequest({
|
||||
userId: saver.userId,
|
||||
url: articleToSave.url,
|
||||
pubsub: ctx.pubsub,
|
||||
articleSavingRequestId: input.clientRequestId,
|
||||
archivedAt: articleToSave.archivedAt,
|
||||
labels: articleToSave.labels,
|
||||
})
|
||||
} catch (e) {
|
||||
return {
|
||||
errorCodes: [SaveErrorCode.Unknown],
|
||||
message: 'Failed to create page save request',
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const newPageId = await createPage(articleToSave, ctx)
|
||||
if (!newPageId) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue