diff options
author | Eric Bailey <git@esb.lol> | 2024-10-16 21:06:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-16 21:06:00 -0500 |
commit | 3d9663db1e3a32ac5daeba5cddbcb86b8eaab971 (patch) | |
tree | e7553b608b626d5cf117ffc9eb0899adfe59d611 /src | |
parent | 21542c4a77a51bfcd6c2f48801559f901f504181 (diff) | |
download | voidsky-3d9663db1e3a32ac5daeba5cddbcb86b8eaab971.tar.zst |
Ensure all configured appLabelers are applied for logged out users (#5784)
* Ensure all configured appLabelers are applied for logged out users * Formatting
Diffstat (limited to 'src')
-rw-r--r-- | src/state/preferences/moderation-opts.tsx | 12 |
1 files changed, 5 insertions, 7 deletions
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, |