Add author and sitename for notifications

This commit is contained in:
Jackson Harper
2023-09-07 18:45:21 +08:00
parent fe4ca89a44
commit b46128c732
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,
}