Skip to content

Commit

Permalink
Remove launched feature gate (bluesky-social#2765)
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey authored Sep 5, 2024
1 parent cb4abbb commit c5b765d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,12 @@ export default function (server: Server, ctx: AppContext) {

const skeleton = async (input: SkeletonFnInput<Context, Params>) => {
const { params, ctx } = input
const gates = ctx.featureGates
const [relativeToDid] = await ctx.hydrator.actor.getDids([params.actor])
if (!relativeToDid) {
throw new InvalidRequestError('Actor not found')
}

if (
ctx.suggestionsAgent &&
gates.check(
await gates.user({ did: params.hydrateCtx.viewer }),
gates.ids.NewSuggestedFollowsByActor,
)
) {
if (ctx.suggestionsAgent) {
const res =
await ctx.suggestionsAgent.api.app.bsky.unspecced.getSuggestionsSkeleton(
{
Expand Down
6 changes: 5 additions & 1 deletion packages/bsky/src/feature-gates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export type Config = {
}

export enum GateID {
NewSuggestedFollowsByActor = 'new_sugg_foll_by_actor',
/**
* Left here ensure this is interpreted as a string enum and therefore
* appease TS
*/
_ = '',
}

/**
Expand Down

0 comments on commit c5b765d

Please sign in to comment.