From 54ecbd743b966542fd73f6bb0a28df2280739bca Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 8 Jan 2025 09:10:31 -0600 Subject: [PATCH] Fix types in dms ReportDialog --- src/components/dms/ReportDialog.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/dms/ReportDialog.tsx b/src/components/dms/ReportDialog.tsx index 06d69ff4be..f9b7d68732 100644 --- a/src/components/dms/ReportDialog.tsx +++ b/src/components/dms/ReportDialog.tsx @@ -5,6 +5,7 @@ import { ComAtprotoModerationCreateReport, RichText as RichTextAPI, } from '@atproto/api' +import {$Typed} from '@atproto/api/dist/client/util' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useMutation} from '@tanstack/react-query' @@ -109,15 +110,16 @@ function SubmitStep({ mutationFn: async () => { if (params.type === 'convoMessage') { const {convoId, message} = params + const subject: $Typed = { + $type: 'chat.bsky.convo.defs#messageRef', + messageId: message.id, + convoId, + did: message.sender.did, + } const report = { reasonType: reportOption.reason, - subject: { - $type: 'chat.bsky.convo.defs#messageRef', - messageId: message.id, - convoId, - did: message.sender.did, - } satisfies ChatBskyConvoDefs.MessageRef, + subject, reason: details, } satisfies ComAtprotoModerationCreateReport.InputSchema