Fix types in dms ReportDialog
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
|||||||
ComAtprotoModerationCreateReport,
|
ComAtprotoModerationCreateReport,
|
||||||
RichText as RichTextAPI,
|
RichText as RichTextAPI,
|
||||||
} from '@atproto/api'
|
} from '@atproto/api'
|
||||||
|
import {$Typed} from '@atproto/api/dist/client/util'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {useMutation} from '@tanstack/react-query'
|
import {useMutation} from '@tanstack/react-query'
|
||||||
@@ -109,15 +110,16 @@ function SubmitStep({
|
|||||||
mutationFn: async () => {
|
mutationFn: async () => {
|
||||||
if (params.type === 'convoMessage') {
|
if (params.type === 'convoMessage') {
|
||||||
const {convoId, message} = params
|
const {convoId, message} = params
|
||||||
|
const subject: $Typed<ChatBskyConvoDefs.MessageRef> = {
|
||||||
|
$type: 'chat.bsky.convo.defs#messageRef',
|
||||||
|
messageId: message.id,
|
||||||
|
convoId,
|
||||||
|
did: message.sender.did,
|
||||||
|
}
|
||||||
|
|
||||||
const report = {
|
const report = {
|
||||||
reasonType: reportOption.reason,
|
reasonType: reportOption.reason,
|
||||||
subject: {
|
subject,
|
||||||
$type: 'chat.bsky.convo.defs#messageRef',
|
|
||||||
messageId: message.id,
|
|
||||||
convoId,
|
|
||||||
did: message.sender.did,
|
|
||||||
} satisfies ChatBskyConvoDefs.MessageRef,
|
|
||||||
reason: details,
|
reason: details,
|
||||||
} satisfies ComAtprotoModerationCreateReport.InputSchema
|
} satisfies ComAtprotoModerationCreateReport.InputSchema
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user