Skip to content

Commit 7519f93

Browse files
authored
fix(feed): use dedicated for_you_by_date config for For You time feed (#3752)
1 parent a020905 commit 7519f93

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

__tests__/feeds.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ describe('query anonymousFeed by time', () => {
626626
.post('/feed.json', (body) => {
627627
// Verify the request includes order_by: 'date' for TIME ranking
628628
expect(body.order_by).toBe(FeedOrderBy.Date);
629-
expect(body.feed_config_name).toBe('custom_feed_na_v1');
629+
expect(body.feed_config_name).toBe('for_you_by_date');
630630
return true;
631631
})
632632
.reply(200, {
@@ -1077,7 +1077,7 @@ describe('query feed', () => {
10771077
loggedUser = '1';
10781078
nock('http://localhost:6000')
10791079
.post('/feed.json', (body) => {
1080-
expect(body.feed_config_name).toBe('custom_feed_na_v1');
1080+
expect(body.feed_config_name).toBe('for_you_by_date');
10811081
expect(body.order_by).toBe(FeedOrderBy.Date);
10821082
expect(body.disable_engagement_filter).toBe(true);
10831083
return true;

__tests__/integrations/feed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ describe('versionToTimeFeedGenerator', () => {
977977
offset: 0,
978978
});
979979

980-
expect(capturedBody.feed_config_name).toBe(FeedConfigName.CustomFeedNaV1);
980+
expect(capturedBody.feed_config_name).toBe(FeedConfigName.ForYouByDate);
981981
expect(capturedBody.order_by).toBe(FeedOrderBy.Date);
982982
expect(capturedBody.disable_engagement_filter).toBe(true);
983983
});

src/integrations/feed/generators.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const feedGenerators: Partial<Record<FeedVersion, FeedGenerator>> =
120120
new FeedPreferencesConfigGenerator(
121121
{
122122
...baseFeedConfig,
123-
feed_config_name: FeedConfigName.CustomFeedNaV1,
123+
feed_config_name: FeedConfigName.ForYouByDate,
124124
min_day_range: 14,
125125
allowed_content_curations: [
126126
'news',
@@ -179,7 +179,7 @@ export const versionToTimeFeedGenerator = (_version: number): FeedGenerator => {
179179
new FeedPreferencesConfigGenerator(
180180
{
181181
...baseFeedConfig,
182-
feed_config_name: FeedConfigName.CustomFeedNaV1,
182+
feed_config_name: FeedConfigName.ForYouByDate,
183183
order_by: FeedOrderBy.Date,
184184
disable_engagement_filter: true,
185185
},

src/integrations/feed/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export enum FeedConfigName {
2121
Popular = 'popular',
2222
// currently used when sorting custom feed by other option then recommended
2323
CustomFeedNaV1 = 'custom_feed_na_v1',
24+
ForYouByDate = 'for_you_by_date',
2425
}
2526

2627
export type FeedProvider = {

0 commit comments

Comments
 (0)