From 5ee0d135a40438d2b32d18afc93d203da0ac2444 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 16 Oct 2024 19:49:23 -0500 Subject: [PATCH] Ensure all configured appLabelers are applied for logged out users --- src/state/preferences/moderation-opts.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/state/preferences/moderation-opts.tsx b/src/state/preferences/moderation-opts.tsx index b0278d5e88..fb4af114e3 100644 --- a/src/state/preferences/moderation-opts.tsx +++ b/src/state/preferences/moderation-opts.tsx @@ -1,5 +1,5 @@ import React, {createContext, useContext, useMemo} from 'react' -import {BSKY_LABELER_DID, ModerationOpts} from '@atproto/api' +import {BskyAgent,ModerationOpts} from '@atproto/api' import {useHiddenPosts, useLabelDefinitions} from '#/state/preferences' import {DEFAULT_LOGGED_OUT_LABEL_PREFERENCES} from '#/state/queries/preferences/moderation' @@ -41,12 +41,10 @@ export function Provider({children}: React.PropsWithChildren<{}>) { ...moderationPrefs, labelers: moderationPrefs.labelers.length ? moderationPrefs.labelers - : [ - { - did: BSKY_LABELER_DID, - labels: DEFAULT_LOGGED_OUT_LABEL_PREFERENCES, - }, - ], + : BskyAgent.appLabelers.map(did => ({ + did, + labels: DEFAULT_LOGGED_OUT_LABEL_PREFERENCES, + })), hiddenPosts: hiddenPosts || [], }, labelDefs,