mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Move the rss content block check to the rss handler
This commit is contained in:
parent
c9b93a1180
commit
816416934f
1 changed files with 7 additions and 5 deletions
|
|
@ -462,10 +462,6 @@ const processSubscription = async (
|
|||
continue
|
||||
}
|
||||
|
||||
if (isContentFetchBlocked(feedUrl)) {
|
||||
fetchContent = false
|
||||
}
|
||||
|
||||
const created = await createTask(
|
||||
userId,
|
||||
feedUrl,
|
||||
|
|
@ -559,6 +555,12 @@ export const rssHandler = Sentry.GCPFunction.wrapHttpFunction(
|
|||
return res.status(500).send('INVALID_RSS_FEED')
|
||||
}
|
||||
|
||||
let allowFetchContent = true
|
||||
if (isContentFetchBlocked(feedUrl)) {
|
||||
console.log('fetching content blocked for feed: ', feedUrl)
|
||||
allowFetchContent = false
|
||||
}
|
||||
|
||||
console.log('Fetched feed', feed.title, new Date())
|
||||
|
||||
await Promise.all(
|
||||
|
|
@ -571,7 +573,7 @@ export const rssHandler = Sentry.GCPFunction.wrapHttpFunction(
|
|||
lastFetchedTimestamps[i],
|
||||
scheduledTimestamps[i],
|
||||
lastFetchedChecksums[i],
|
||||
fetchContents[i],
|
||||
fetchContents[i] && allowFetchContent,
|
||||
folders[i],
|
||||
feed
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue