about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhailey <hailey@blueskyweb.xyz>2025-09-11 00:31:17 -0700
committerGitHub <noreply@github.com>2025-09-11 00:31:17 -0700
commit836d16fec9788a649542211110fca105c5290ddb (patch)
tree82e7433b6543bfa08b0bf4d3b007087010f7827d
parent58ffe365ae96a370e81567cbe35afb07e5eb5d98 (diff)
downloadvoidsky-836d16fec9788a649542211110fca105c5290ddb.tar.zst
ensure mod service header present for appeals (#9025)
-rw-r--r--src/screens/Takendown.tsx27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/screens/Takendown.tsx b/src/screens/Takendown.tsx
index d01903eb5..052108373 100644
--- a/src/screens/Takendown.tsx
+++ b/src/screens/Takendown.tsx
@@ -9,7 +9,10 @@ import {useLingui} from '@lingui/react'
 import {useMutation} from '@tanstack/react-query'
 import Graphemer from 'graphemer'
 
-import {MAX_REPORT_REASON_GRAPHEME_LENGTH} from '#/lib/constants'
+import {
+  BLUESKY_MOD_SERVICE_HEADERS,
+  MAX_REPORT_REASON_GRAPHEME_LENGTH,
+} from '#/lib/constants'
 import {useEnableKeyboardController} from '#/lib/hooks/useEnableKeyboardController'
 import {cleanError} from '#/lib/strings/errors'
 import {isIOS, isWeb} from '#/platform/detection'
@@ -49,14 +52,20 @@ export function Takendown() {
   } = useMutation({
     mutationFn: async (appealText: string) => {
       if (!currentAccount) throw new Error('No session')
-      await agent.com.atproto.moderation.createReport({
-        reasonType: ComAtprotoModerationDefs.REASONAPPEAL,
-        subject: {
-          $type: 'com.atproto.admin.defs#repoRef',
-          did: currentAccount.did,
-        } satisfies ComAtprotoAdminDefs.RepoRef,
-        reason: appealText,
-      })
+      await agent.com.atproto.moderation.createReport(
+        {
+          reasonType: ComAtprotoModerationDefs.REASONAPPEAL,
+          subject: {
+            $type: 'com.atproto.admin.defs#repoRef',
+            did: currentAccount.did,
+          } satisfies ComAtprotoAdminDefs.RepoRef,
+          reason: appealText,
+        },
+        {
+          encoding: 'application/json',
+          headers: BLUESKY_MOD_SERVICE_HEADERS,
+        },
+      )
     },
     onSuccess: () => setReason(''),
   })