about summary refs log tree commit diff
path: root/src/state
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-10-16 21:06:00 -0500
committerGitHub <noreply@github.com>2024-10-16 21:06:00 -0500
commit3d9663db1e3a32ac5daeba5cddbcb86b8eaab971 (patch)
treee7553b608b626d5cf117ffc9eb0899adfe59d611 /src/state
parent21542c4a77a51bfcd6c2f48801559f901f504181 (diff)
downloadvoidsky-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/state')
-rw-r--r--src/state/preferences/moderation-opts.tsx12
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,