Skip to content

Commit

Permalink
[PAY-2656] Filter out premium albums from feed if FF off (#8181)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan authored Apr 22, 2024
1 parent 2cc7fce commit 8feb22b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/web/src/common/store/lineup/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ function* filterDeletes<T extends Track | Collection>(
const isUSDCGatedContentEnabled = getFeatureEnabled(
FeatureFlags.USDC_PURCHASES
)
const isPremiumAlbumsEnabled = getFeatureEnabled(
FeatureFlags.PREMIUM_ALBUMS_ENABLED
)

const deniedHandles = remoteConfig
.getRemoteVar(StringKeys.EXPLORE_PREMIUM_DENIED_USERS)
Expand All @@ -100,6 +103,14 @@ function* filterDeletes<T extends Track | Collection>(
return null
}

if (
!isPremiumAlbumsEnabled &&
'playlist_id' in metadata &&
metadata.is_stream_gated
) {
return null
}

// Filter out known test accounts from premium explore page.
if (
lineupPrefix === premiumTracksPageLineupActions.prefix &&
Expand Down

0 comments on commit 8feb22b

Please sign in to comment.