diff --git a/packages/api/src/resolvers/subscriptions/index.ts b/packages/api/src/resolvers/subscriptions/index.ts index 20d9825c1..a2fa5e8c4 100644 --- a/packages/api/src/resolvers/subscriptions/index.ts +++ b/packages/api/src/resolvers/subscriptions/index.ts @@ -228,10 +228,10 @@ export const subscribeResolver = authorized< // limit number of rss subscriptions to 150 const results = (await getRepository(Subscription).query( - `insert into omnivore.subscriptions (name, url, description, type, user_id, icon) - select $1, $2, $3, $4, $5, $6, $8 from omnivore.subscriptions + `insert into omnivore.subscriptions (name, url, description, type, user_id, icon, is_fetching_content) + select $1, $2, $3, $4, $5, $6, $7 from omnivore.subscriptions where user_id = $5 and type = 'RSS' and status = 'ACTIVE' - having count(*) < $7 + having count(*) < $8 returning *;`, [ feed.title, @@ -240,8 +240,8 @@ export const subscribeResolver = authorized< SubscriptionType.Rss, uid, feed.image?.url || null, - MAX_RSS_SUBSCRIPTIONS, !!input.isFetchingContent, + MAX_RSS_SUBSCRIPTIONS, ] )) as Subscription[] diff --git a/packages/api/src/routers/svc/rss_feed.ts b/packages/api/src/routers/svc/rss_feed.ts index 793fa8843..597a49e7c 100644 --- a/packages/api/src/routers/svc/rss_feed.ts +++ b/packages/api/src/routers/svc/rss_feed.ts @@ -35,7 +35,7 @@ export function rssFeedRouter() { ARRAY_AGG(last_fetched_at) AS "fetchedDates", ARRAY_AGG(coalesce(scheduled_at, NOW())) AS "scheduledDates", ARRAY_AGG(last_fetched_checksum) AS checksums, - ARRAY_AGG(coalesce(is_fetching_content, false)) AS "isFetchingContents", + ARRAY_AGG(coalesce(is_fetching_content, false)) AS "isFetchingContents" FROM omnivore.subscriptions WHERE