From 5b5c96992f0891b870c88dc56752fb52503b146d Mon Sep 17 00:00:00 2001 From: Chris Bongers Date: Mon, 23 Dec 2024 16:42:31 +0200 Subject: [PATCH] fix: always return custom feed --- src/schema/feeds.ts | 56 ++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/src/schema/feeds.ts b/src/schema/feeds.ts index 6f3da6f79..d5311c9bb 100644 --- a/src/schema/feeds.ts +++ b/src/schema/feeds.ts @@ -1499,47 +1499,31 @@ export const resolvers: IResolvers = traceResolvers< ); } - if ( - args.version >= 2 && - args.ranking === Ranking.POPULARITY && - ctx.userId - ) { - const feedGenerator = new FeedGenerator( - feedClient, - new FeedPreferencesConfigGenerator( - { - feed_config_name: FeedConfigName.CustomFeedV1, - }, - { - includeAllowedTags: true, - includePostTypes: true, - includeBlockedSources: true, - includeBlockedTags: true, - includeContentCuration: true, - includeBlockedWords: true, - includeAllowedUsers: true, - includeAllowedSources: true, - feedId: feedId, - }, - ), - ); - - return feedResolverCursor( - source, + const feedGenerator = new FeedGenerator( + feedClient, + new FeedPreferencesConfigGenerator( { - ...(args as FeedArgs), - generator: feedGenerator, + feed_config_name: FeedConfigName.CustomFeedV1, }, - ctx, - info, - ); - } + { + includeAllowedTags: true, + includePostTypes: true, + includeBlockedSources: true, + includeBlockedTags: true, + includeContentCuration: true, + includeBlockedWords: true, + includeAllowedUsers: true, + includeAllowedSources: true, + feedId: feedId, + }, + ), + ); - return feedResolverV1( + return feedResolverCursor( source, { - ...args, - feedId, + ...(args as FeedArgs), + generator: feedGenerator, }, ctx, info,