Merge pull request #1371 from omnivore-app/fix/readwise-integration

Fix readwise api error when image_url is empty by removing image_url from api payload
This commit is contained in:
Hongbo Wu 2022-10-31 15:15:21 +08:00 committed by GitHub
commit a29f0df35e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,11 +69,11 @@ const pageToReadwiseHighlight = (page: Page): ReadwiseHighlight[] => {
return {
text: highlight.quote,
title: page.title,
author: page.author,
author: page.author || undefined,
highlight_url: getHighlightUrl(page.slug, highlight.id),
highlighted_at: new Date(highlight.createdAt).toISOString(),
category: 'articles',
image_url: page.image,
image_url: page.image || undefined,
location: highlight.highlightPositionPercent || undefined,
location_type: 'order',
note: highlight.annotation || undefined,