From c39b307e09ab0a1c1841864f925dad2f7585fe88 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 24 Feb 2025 10:26:10 -0600 Subject: [PATCH] Comment out debug code --- src/state/queries/labeler.ts | 38 ++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/src/state/queries/labeler.ts b/src/state/queries/labeler.ts index a7c70c3252..b061911f37 100644 --- a/src/state/queries/labeler.ts +++ b/src/state/queries/labeler.ts @@ -1,4 +1,4 @@ -import {AppBskyLabelerDefs, ComAtprotoModerationDefs} from '@atproto/api' +import {AppBskyLabelerDefs} from '@atproto/api' import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query' import {z} from 'zod' @@ -11,16 +11,6 @@ import { } from '#/state/queries/preferences' import {useAgent} from '#/state/session' -const BSKY_MOD_SERVICE = 'did:plc:ar7c4by46qjdydhdevvrndac' -const REASON_TYPES = [ - ComAtprotoModerationDefs.REASONSPAM, - ComAtprotoModerationDefs.REASONVIOLATION, - ComAtprotoModerationDefs.REASONMISLEADING, - ComAtprotoModerationDefs.REASONSEXUAL, - ComAtprotoModerationDefs.REASONRUDE, - ComAtprotoModerationDefs.REASONOTHER, -] - const labelerInfoQueryKeyRoot = 'labeler-info' export const labelerInfoQueryKey = (did: string) => [ labelerInfoQueryKeyRoot, @@ -83,21 +73,27 @@ export function useLabelersDetailedInfoQuery({dids}: {dids: string[]}) { dids, detailed: true, }) + return res.data.views as AppBskyLabelerDefs.LabelerViewDetailed[] + /* + const BSKY_MOD_SERVICE = 'did:plc:ar7c4by46qjdydhdevvrndac' const decorated = res.data.views.map(view => ({ ...view, reasonTypes: REASON_TYPES, - subjectTypes: - // @ts-expect-error TODO - view.creator.did === BSKY_MOD_SERVICE - ? ['account', 'record', 'chat'] - : ['account', 'record'], - subjectCollections: - // @ts-expect-error TODO - view.creator.did === BSKY_MOD_SERVICE - ? undefined - : ['app.bsky.feed.post'], + subjectTypes: undefined, + subjectCollections: undefined, + // subjectTypes: + // // @ts-expect-error TODO + // view.creator.did === BSKY_MOD_SERVICE + // ? ['account', 'record', 'chat'] + // : ['account', 'record'], + // subjectCollections: + // // @ts-expect-error TODO + // view.creator.did === BSKY_MOD_SERVICE + // ? undefined + // : ['app.bsky.feed.post', 'app.bsky.actor.profile'], })) return decorated as AppBskyLabelerDefs.LabelerViewDetailed[] + */ }, }) }