about summary refs log tree commit diff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/ReportDialog/SubmitView.tsx35
-rw-r--r--src/components/moderation/LabelsOnMeDialog.tsx43
2 files changed, 25 insertions, 53 deletions
diff --git a/src/components/ReportDialog/SubmitView.tsx b/src/components/ReportDialog/SubmitView.tsx
index 7ceece75b..2def0fa4b 100644
--- a/src/components/ReportDialog/SubmitView.tsx
+++ b/src/components/ReportDialog/SubmitView.tsx
@@ -6,7 +6,6 @@ import {useLingui} from '@lingui/react'
 
 import {getLabelingServiceTitle} from '#/lib/moderation'
 import {ReportOption} from '#/lib/moderation/useReportOptions'
-import {useGate} from '#/lib/statsig/statsig'
 import {useAgent} from '#/state/session'
 import {CharProgress} from '#/view/com/composer/char-progress/CharProgress'
 import * as Toast from '#/view/com/util/Toast'
@@ -37,7 +36,6 @@ export function SubmitView({
   const t = useTheme()
   const {_} = useLingui()
   const agent = useAgent()
-  const gate = useGate()
   const [details, setDetails] = React.useState<string>('')
   const [submitting, setSubmitting] = React.useState<boolean>(false)
   const [selectedServices, setSelectedServices] = React.useState<string[]>([
@@ -63,27 +61,17 @@ export function SubmitView({
     }
     const results = await Promise.all(
       selectedServices.map(did => {
-        if (gate('session_withproxy_fix')) {
-          return agent
-            .createModerationReport(report, {
-              encoding: 'application/json',
-              headers: {
-                'atproto-proxy': `${did}#atproto_labeler`,
-              },
-            })
-            .then(
-              _ => true,
-              _ => false,
-            )
-        } else {
-          return agent
-            .withProxy('atproto_labeler', did)
-            .createModerationReport(report)
-            .then(
-              _ => true,
-              _ => false,
-            )
-        }
+        return agent
+          .createModerationReport(report, {
+            encoding: 'application/json',
+            headers: {
+              'atproto-proxy': `${did}#atproto_labeler`,
+            },
+          })
+          .then(
+            _ => true,
+            _ => false,
+          )
       }),
     )
 
@@ -108,7 +96,6 @@ export function SubmitView({
     onSubmitComplete,
     setError,
     agent,
-    gate,
   ])
 
   return (
diff --git a/src/components/moderation/LabelsOnMeDialog.tsx b/src/components/moderation/LabelsOnMeDialog.tsx
index b920a0d25..cc11b4101 100644
--- a/src/components/moderation/LabelsOnMeDialog.tsx
+++ b/src/components/moderation/LabelsOnMeDialog.tsx
@@ -7,7 +7,6 @@ import {useMutation} from '@tanstack/react-query'
 
 import {useLabelInfo} from '#/lib/moderation/useLabelInfo'
 import {makeProfileLink} from '#/lib/routes/links'
-import {useGate} from '#/lib/statsig/statsig'
 import {sanitizeHandle} from '#/lib/strings/handles'
 import {logger} from '#/logger'
 import {useAgent, useSession} from '#/state/session'
@@ -204,7 +203,6 @@ function AppealForm({
   const [details, setDetails] = React.useState('')
   const isAccountReport = 'did' in subject
   const agent = useAgent()
-  const gate = useGate()
   const sourceName = labeler
     ? sanitizeHandle(labeler.creator.handle, '@')
     : label.src
@@ -214,35 +212,22 @@ function AppealForm({
       const $type = !isAccountReport
         ? 'com.atproto.repo.strongRef'
         : 'com.atproto.admin.defs#repoRef'
-      if (gate('session_withproxy_fix')) {
-        await agent.createModerationReport(
-          {
-            reasonType: ComAtprotoModerationDefs.REASONAPPEAL,
-            subject: {
-              $type,
-              ...subject,
-            },
-            reason: details,
+      await agent.createModerationReport(
+        {
+          reasonType: ComAtprotoModerationDefs.REASONAPPEAL,
+          subject: {
+            $type,
+            ...subject,
           },
-          {
-            encoding: 'application/json',
-            headers: {
-              'atproto-proxy': `${label.src}#atproto_labeler`,
-            },
+          reason: details,
+        },
+        {
+          encoding: 'application/json',
+          headers: {
+            'atproto-proxy': `${label.src}#atproto_labeler`,
           },
-        )
-      } else {
-        await agent
-          .withProxy('atproto_labeler', label.src)
-          .createModerationReport({
-            reasonType: ComAtprotoModerationDefs.REASONAPPEAL,
-            subject: {
-              $type,
-              ...subject,
-            },
-            reason: details,
-          })
-      }
+        },
+      )
     },
     onError: err => {
       logger.error('Failed to submit label appeal', {message: err})