diff --git a/packages/api/src/bsky-agent.ts b/packages/api/src/bsky-agent.ts index 64fb4cd1c89..6f0bf88e03b 100644 --- a/packages/api/src/bsky-agent.ts +++ b/packages/api/src/bsky-agent.ts @@ -851,7 +851,6 @@ async function updateFeedPreferences( function adjustLegacyContentLabelPref( pref: AppBskyActorDefs.ContentLabelPref, ): AppBskyActorDefs.ContentLabelPref { - let label = pref.label let visibility = pref.visibility // adjust legacy values @@ -859,15 +858,7 @@ function adjustLegacyContentLabelPref( visibility = 'ignore' } - // adjust legacy labels - if (label === 'nsfw') { - label = 'porn' - } - if (label === 'suggestive') { - label = 'sexual' - } - - return { ...pref, label, visibility } + return { ...pref, visibility } } /** diff --git a/packages/api/tests/moderation-prefs.test.ts b/packages/api/tests/moderation-prefs.test.ts index 93255941fce..fcfe36400f7 100644 --- a/packages/api/tests/moderation-prefs.test.ts +++ b/packages/api/tests/moderation-prefs.test.ts @@ -28,7 +28,7 @@ describe('agent', () => { preferences: [ { $type: 'app.bsky.actor.defs#contentLabelPref', - label: 'nsfw', + label: 'porn', visibility: 'show', }, { @@ -38,12 +38,12 @@ describe('agent', () => { }, { $type: 'app.bsky.actor.defs#contentLabelPref', - label: 'suggestive', + label: 'sexual', visibility: 'show', }, { $type: 'app.bsky.actor.defs#contentLabelPref', - label: 'gore', + label: 'graphic-media', visibility: 'show', }, ], @@ -60,7 +60,7 @@ describe('agent', () => { porn: 'ignore', nudity: 'ignore', sexual: 'ignore', - gore: 'ignore', + 'graphic-media': 'ignore', }, labelers: [], hiddenPosts: [],