Merge pull request #1538 from omnivore-app/fix/recommended-highlights

fix/recommended highlights
This commit is contained in:
Hongbo Wu
2022-12-13 12:26:27 +08:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@ -204,8 +204,9 @@ export const recommendResolver = authorized<
}
}
// only recommend highlights created by the user
const recommendedHighlightIds = input.recommendedWithHighlights
? page.highlights?.map((h) => h.id)
? page.highlights?.filter((h) => h.userId === uid)?.map((h) => h.id)
: undefined
const exp = Math.floor(Date.now() / 1000) + 60 * 60 * 24 // 1 day

View File

@ -254,6 +254,7 @@ export const createLabelAndRuleForGroup = async (
],
},
],
filter: `recommendedBy:"${groupName}"`,
// add a condition to check if the page is created
filter: `event:created recommendedBy:"${groupName}"`,
})
}