Merge pull request #2742 from omnivore-app/feat/api-notification-titles

Add author and sitename for notifications
This commit is contained in:
Jackson Harper
2023-09-07 19:24:45 +08:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,8 @@ interface Page {
readingProgressPercent: number
title: string
image: string | null
author: string | null
siteName: string | null
}
interface Label {
@ -45,6 +47,8 @@ export const search = async (
readingProgressPercent
title
image
author
siteName
}
}
}

View File

@ -137,7 +137,7 @@ export const triggerActions = async (
)
case RuleActionType.SendNotification: {
const data: NotificationData = {
title: 'New page added to your library',
title: filteredPage.author || filteredPage.siteName || 'Omnivore',
body: filteredPage.title,
image: filteredPage.image || undefined,
}