From 3d9663db1e3a32ac5daeba5cddbcb86b8eaab971 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 16 Oct 2024 21:06:00 -0500 Subject: Ensure all configured appLabelers are applied for logged out users (#5784) * Ensure all configured appLabelers are applied for logged out users * Formatting --- src/state/preferences/moderation-opts.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/state/preferences/moderation-opts.tsx b/src/state/preferences/moderation-opts.tsx index b0278d5e8..ecae85b9f 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, -- cgit 1.4.1