diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-09-05 17:33:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-05 09:33:27 -0500 |
commit | ac0c4ef2d954a746d3696e6fb268c922a291e908 (patch) | |
tree | 69afde5d10dd552900bd69fd6538ad080dc77bcd /src/components/dms/ReportDialog.tsx | |
parent | 917256713f7c811413ec9d305a56c65aae58fd6e (diff) | |
download | voidsky-ac0c4ef2d954a746d3696e6fb268c922a291e908.tar.zst |
ensure headers are set when chat reporting (#8985)
Diffstat (limited to 'src/components/dms/ReportDialog.tsx')
-rw-r--r-- | src/components/dms/ReportDialog.tsx | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/components/dms/ReportDialog.tsx b/src/components/dms/ReportDialog.tsx index e4c37c7b5..b6a428193 100644 --- a/src/components/dms/ReportDialog.tsx +++ b/src/components/dms/ReportDialog.tsx @@ -1,19 +1,21 @@ -import React, {memo, useMemo, useState} from 'react' +import {memo, useMemo, useState} from 'react' import {View} from 'react-native' import { - $Typed, - AppBskyActorDefs, - ChatBskyConvoDefs, - ComAtprotoModerationCreateReport, + type $Typed, + type AppBskyActorDefs, + type ChatBskyConvoDefs, + type ComAtprotoModerationCreateReport, RichText as RichTextAPI, } from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {StackActions, useNavigation} from '@react-navigation/native' import {useMutation} from '@tanstack/react-query' +import type React from 'react' -import {ReportOption} from '#/lib/moderation/useReportOptions' -import {NavigationProp} from '#/lib/routes/types' +import {BLUESKY_MOD_SERVICE_HEADERS} from '#/lib/constants' +import {type ReportOption} from '#/lib/moderation/useReportOptions' +import {type NavigationProp} from '#/lib/routes/types' import {isNative} from '#/platform/detection' import {useProfileShadow} from '#/state/cache/profile-shadow' import {useLeaveConvo} from '#/state/queries/messages/leave-conversation' @@ -168,7 +170,10 @@ function SubmitStep({ reason: details, } satisfies ComAtprotoModerationCreateReport.InputSchema - await agent.createModerationReport(report) + await agent.createModerationReport(report, { + encoding: 'application/json', + headers: BLUESKY_MOD_SERVICE_HEADERS, + }) } }, onSuccess: onComplete, |