remove slug from highlight event
This commit is contained in:
@ -68,9 +68,8 @@ export const createHighlight = async (
|
|||||||
EntityType.HIGHLIGHT,
|
EntityType.HIGHLIGHT,
|
||||||
{
|
{
|
||||||
id: libraryItemId,
|
id: libraryItemId,
|
||||||
slug: newHighlight.libraryItem.slug,
|
originalUrl: newHighlight.libraryItem.originalUrl, // for Readwise
|
||||||
originalUrl: newHighlight.libraryItem.originalUrl,
|
thumbnail: newHighlight.libraryItem.thumbnail, // for Readwise
|
||||||
thumbnail: newHighlight.libraryItem.thumbnail,
|
|
||||||
highlights: [cleanData],
|
highlights: [cleanData],
|
||||||
},
|
},
|
||||||
userId
|
userId
|
||||||
@ -122,7 +121,6 @@ export const mergeHighlights = async (
|
|||||||
EntityType.HIGHLIGHT,
|
EntityType.HIGHLIGHT,
|
||||||
{
|
{
|
||||||
id: libraryItemId,
|
id: libraryItemId,
|
||||||
slug: newHighlight.libraryItem.slug,
|
|
||||||
originalUrl: newHighlight.libraryItem.originalUrl,
|
originalUrl: newHighlight.libraryItem.originalUrl,
|
||||||
thumbnail: newHighlight.libraryItem.thumbnail,
|
thumbnail: newHighlight.libraryItem.thumbnail,
|
||||||
highlights: [newHighlight],
|
highlights: [newHighlight],
|
||||||
|
|||||||
@ -101,14 +101,14 @@ export class ReadwiseClient implements IntegrationClient {
|
|||||||
text: highlight.quote,
|
text: highlight.quote,
|
||||||
title: item.title,
|
title: item.title,
|
||||||
author: item.author || undefined,
|
author: item.author || undefined,
|
||||||
highlight_url: getHighlightUrl(item.slug as string, highlight.id),
|
highlight_url: getHighlightUrl(item.id, highlight.id),
|
||||||
highlighted_at: highlight.createdAt as string | undefined,
|
highlighted_at: highlight.createdAt as string | undefined,
|
||||||
category,
|
category,
|
||||||
image_url: item.thumbnail || undefined,
|
image_url: item.thumbnail || undefined,
|
||||||
location_type: 'order',
|
location_type: 'order',
|
||||||
note: highlight.annotation || undefined,
|
note: highlight.annotation || undefined,
|
||||||
source_type: 'omnivore',
|
source_type: 'omnivore',
|
||||||
source_url: item.originalUrl as string,
|
source_url: item.originalUrl,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
: []
|
: []
|
||||||
|
|||||||
Reference in New Issue
Block a user